Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Image save filure

Hi, I've got vety tricky problem. My app fails to write image. Problem is not usual because on a different phone it worked perfectly.

Image saving fails on SE wt19i. SdCard works ok - phone can save photos with no problem. Moreover I file.mkdirs() also work as it should.

Of course I have correct manifest file: ( uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" )

What could possibly cause failure ?

Here is my code:

private boolean saveImage (Mat mat) { File path = new File(Environment.getExternalStorageDirectory() + "/Images/"); File file = new File(path, "SeCam " + new Date() + ".png");

String filename = file.toString(); boolean ok = Highgui.imwrite(filename, mat);

return ok; }

Image save filure

  • List item

Hi, I've got vety tricky problem. My app fails to write image. Problem is not usual because on a different phone it worked perfectly.

Image saving fails on SE wt19i. SdCard works ok - phone can save photos with no problem. Moreover I file.mkdirs() also work as it should.

Of course I have correct manifest file: ( file: uses-permission <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />)

What could possibly cause failure ?

Here is my code:

private boolean saveImage (Mat mat) { File path = new File(Environment.getExternalStorageDirectory() + "/Images/"); File file = new File(path, "SeCam " + new Date() + ".png");

".png");

String filename = file.toString(); boolean ok = Highgui.imwrite(filename, mat); boolean ok = Highgui.imwrite(filename, mat);

return ok; }

return ok; }

Image save filure

  • List item

Hi, I've got vety tricky problem. My app fails to write image. Problem is not usual because on a different phone it worked perfectly.

Image saving fails on SE wt19i. SdCard works ok - phone can save photos with no problem. Moreover I file.mkdirs() also work as it should.

Of course I have correct manifest file: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

What could possibly cause failure ?

Here is my code:

private boolean saveImage (Mat mat) {
        File path = new File(Environment.getExternalStorageDirectory() + "/Images/");
       path.mkdirs();
       File file = new File(path, "SeCam " + new Date() + ".png");
".jpeg");

       String filename = file.toString();
       boolean ok = return Highgui.imwrite(filename, mat);

       return ok;
}
click to hide/show revision 4
retagged

updated 2014-09-05 09:55:02 -0600

berak gravatar image

Image save filure

  • List item

Hi, I've got vety tricky problem. My app fails to write image. Problem is not usual because on a different phone it worked perfectly.

Image saving fails on SE wt19i. SdCard works ok - phone can save photos with no problem. Moreover I file.mkdirs() also work as it should.

Of course I have correct manifest file: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

What could possibly cause failure ?

Here is my code:

private boolean saveImage (Mat mat) {
       File path = new File(Environment.getExternalStorageDirectory() + "/Images/");
       path.mkdirs();
       File file = new File(path, "SeCam " + new Date() + ".jpeg");

       String filename = file.toString();
       return Highgui.imwrite(filename, mat);
}