http://developer.android.com/guide/appendix/media-formats.html
Refer above link. It says only JPEG encoder is supported. Only decoder is supported for GIF, PNG & BMP. BR, Shaddu On 27/02/2009, Rohit <mord...@gmail.com> wrote: > > For PNGs that field is jhust ignored - so says the Android > documentation > > Rohit > > On Feb 26, 1:59 pm, mark.ka...@gmail.com wrote: >> PNGs are based on vector graphics instead of raster graphics which >> are used ny .jpeg, I don't think compression will work on vector >> graphic files.Vector graphic files have there own compression , which >> is based on graphic primitives instead of rasters/pixels. PNG's should >> more fairly compact to begin with, which is one advantage of vector >> formats >> >> Mark >> >> On Feb 26, 9:37 am, Rohit <mord...@gmail.com> wrote: >> >> > Here is a PNG file that I was using for testing.... >> >> >http://www.lumbercartel.ca/fun/wallpaper/lumber_cartel_1_800x600.png >> >> > Rohit >> >> > On Feb 25, 5:21 pm, Rohit <mord...@gmail.com> wrote: >> >> > > Has anyone seen failures from bitmap.compress() for PNG files? >> >> > > I have a byte array that holds image data (read from a PNG file). I >> > > have verified that the image can be displayed in an ImageView by >> > > getting a bitmap as follows: >> >> > > Bitmap bitmap = BitmapFactory.decodeByteArray(b, 0, >> > > b.length); >> >> > > Now, if I do >> >> > > bitmap.compress(Bitmap.CompressFormat.PNG, 100, >> > > fileoutputstream) >> >> > > then the compress method returns me false and the file is not written. >> > > I have a valid fileoutputstream. >> >> > > If I start out with a JPEG image in the beginning instead of a PNG >> > > then it seems to work fine. It just fails if it is a PNG image. >> > > Initially I thought it was because my PNG file was in Indexed Color >> > > Mode (checked it in Photoshop) but the problem persisted even if I >> > > changed it to RGB Color mode. >> >> > > Any clue what could be the problem? >> >> > > If anyone has seen this please update the bug that I filed >> > > :http://code.google.com/p/android/issues/detail?can=2&q=2092&colspec=I...Hide >> > > quoted text - >> >> > - Show quoted text - >> >> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---