08-27-2012 01:06 PM
So I have a file browswer created and i'm able to select a file from the browser and it returns the filepath
like this
accounts/1000/shared/camera/IMG_00000053.jpg
I then use the filepath and try to load the picture and is crashing.
rc = img_load_file(ilib, "accounts/1000/shared/camera/IMG_00000053.jpg", null, &img);
is the above correct or I need to add something to the path?
I can load a image from the asset fine like this
rc = img_load_file(ilib, "app/native/test.jpg", null, &img);
thanks
08-27-2012 01:12 PM
08-27-2012 02:37 PM
thanks for but i'm stilling having issues. already have file access set.
I have use the following
file:///shared/camera/IMG_00000053.jpg
file:///accounts/1000/shared/camera/IMG_00000053.j
and it says no such directory.
If I use shared/camera/IMG_00000053.jpg it crashes.
08-27-2012 02:49 PM
08-27-2012 02:53 PM
I know the file is there because it use the file browser to pick it.
The error msg is displayed from my debug code in the console.
do you know the format of the filename? does it require file:// connection and then the full path?
do you have example with the correct filepath when loading a file?
thanks
08-27-2012 03:21 PM
08-27-2012 03:30 PM
I wish there are more dev docs from RIM and i've been reading some of your past notes and still couldn't figure out. All I really want to do is read the picture from the camera folder.
Here is my exact code
const char *img_path = "/shared/camera/IMG_00000053.jpg";
rc = img_load_file(ilib, path, &callouts, &img);
if (rc != 0)
perror("loading err: ");
I have tried many different ways for the path and nothing works.
Very frustration...
08-27-2012 03:41 PM
08-27-2012 04:01 PM - edited 08-27-2012 04:05 PM
Thanks peter9477. The problem was with the callout. The image was too big for the screen.
I read one can use ImageView. is that only for cascade?