Can't display image formatted png on Android -
today encounter strange question. have png image "image.png", generatied java code, , anthor image "a.png". import them /sdcard/image/ directory. when invoke code
bitmap bit = bitmapfactory.decodefile("/sdcard/image/image.png"); and
bit = bitmapfactory.decodefile("/sdcard/image/a.png"); on android, first bit null latter not. sure path "/sdcard/image" right.
could me???
you can path of sdcard code:
file extstore = environment.getexternalstoragedirectory(); then specify foldername , file name
"/image/"+"image.jpg" bit = bitmapfactory.decodefile(extstore +"/image/a.jpg");
Comments
Post a Comment