java - Android: Image upload to web-service loses EXIF data -


please help,

i upload image web-service have exif data attached @ time of upload. when arrives on server, minus it's exif data.

  bitmap bmp = bitmapfactory.decodefile(fullfilename);                   if (bmp == null) {                     //oh sugar, not cool                      continue;                 }                   bytearrayoutputstream stream = new bytearrayoutputstream();                   bmp.compress(bitmap.compressformat.jpeg, 60, stream);                   byte[] bytearray = stream.tobytearray();                   defaulthttpclient client = new defaulthttpclient();                 httppost post = new httppost("webserviceurl");                 bytearrayentity test = new bytearrayentity(bytearray){...}       post.setentity(test);    

before upload image, it's stored devices sd card decoded using bitmapfactory class.

i'm thinking during image compression lost, got solution or idea ?

thanks

burrows111

exif data stripped during encode. however, exifinterface allow set exif data on compressed file. unfortunately, you'll need compress image, write file, set exif on file, , upload that.


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -