Show image stored in SDCARD (sdk 26)

edited October 2018 in Android Mode

Hello, I have try many tutorials/issues whitout succes, but i'have got the same results : java.lang.IllegalArgumentException: File /storage/emulated/0/DCIM/cat.jpg contains a path separator

Here is my code :

import android.os.Environment;
PImage img;

void setup() {
  String path=new  String(android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DCIM).getAbsolutePath());
  println(path);
  img = loadImage(sketchPath(path+"/cat.jpg"));
}

Answers

Sign In or Register to comment.