Image save filure [closed]

asked 2014-09-05 09:37:07 -0600

chriskrk gravatar image

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

berak gravatar image
  • 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);
}
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-14 11:00:20.945720

Comments

probably imwrite can't open the file for writing, since 'file' is still opened ?

berak gravatar imageberak ( 2014-09-05 09:58:47 -0600 )edit