android - Image inserted into gallery not the same that is saved to storage -
i have been browsing while not able find topic came problem.
my drawing application should able save drawn images. want save them png files, utilize code:
outputstream fout = null; string dirpath = environment.getexternalstoragedirectory().tostring(); file file = new file(dirpath, "drawing0.png"); fout = new fileoutputstream(file); drawview.getdrawingcache().compress(bitmap.compressformat.png, 100, fout); fout.flush(); fout.close(); imgsaved = mediastore.images.media.insertimage(getapplicationcontext().getcontentresolver(), file.getabsolutepath(), file.getname(), file.getname());
now image saved directory , png file. gallery image jpg , seems gallery copying original file , transforms jpg, because tells me different file directory:
gallery path file path
now want know if can avoided, because if user wants share image e.g. via dropbox uploads gallery jpg image , not original png. using standard samsung gallery app if matters.
android image png jpeg android-gallery
No comments:
Post a Comment