[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-25 Thread karthikr
Thanks a lot for your advice. Ill update u on the same once i get a solution. Regards, R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to and

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-25 Thread Streets Of Boston
That's what i'm doing with my app as well. And i have the same issue. As soon as your re-read a JPEG and save it again (modified or not), you will get loss of quality. There is no other way around it. In my app, i don't save over the original image. I do a 'save-as', more or less. At least the or

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-25 Thread karthikr
My application reads existing images from the mobile, and allows the user to edit it and save it, if the image is in a jpeg format there is a loss in quality when the image is edited and saved. Is there any other way to open a jpeg image edit it and save it back? Also i have noted one more thing

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-25 Thread Streets Of Boston
If you write a JPG, information is written with a loss. Always. Even with quality=100, some loss will occur. If you do this repeatedly, losses in image-data will compound. Why not use the PNG format? Why do you need to write a JPG? On Aug 25, 4:23 am, karthikr wrote: > This is what i am doing c

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-25 Thread karthikr
This is what i am doing can u please guide me as to what should be corrected here, On opening the file, mBitmap = BitmapFactory.decodeStream(concontentresolver.openInputStream (uri)); //to create a mutable bitmap out of it mBitmap = Bitmap.createScaledBitmap(mBitmap,mBitmap.getwidth (),mBitmap.g

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-23 Thread Streets Of Boston
Bitmap bmToSave = ... // the bitmap you want to save int height = ... // height of bitmap int width = ... // width of bitmap int[] bmData = new int[TMP_BUFFER_SIZE]; // holds the ARGB data for pixels of bmToSave int heightChunk = ... // number of pixel-rows of bmToSave that will fit into the buf

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-23 Thread karthikr
I am trying to write the contents of the bitmap without doing a compress on it for a format, as I am facing somme problems in quality while formatting. I am using thte below code but its not working, ByteBuffer bf = ByteBuffer.allocate(IMAGE_WIDTH*IMAGE_HEIGHT*4); mBitmap.copyPixelsToBuffer(bf)

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-22 Thread Streets Of Boston
I'm writing an app that needs to save a color-corrected full-sized (6 megapixels == 12MByte) to a file (since it can't be held in memory next to the original non-color-corrected bitmap): 'Original Bitmap' + 'ColorMatrix' --> 'Color-Corrected Bitmap in a file' I use getPixels to get an integer-a

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-22 Thread Mark Murphy
karthikr wrote: > Hi Guys, > > Im still not able to figure out the problem. > > When i try to use the Bitmaps compress method for PNG formats there > doesnt seems to be any problem. > > But for JPEG format there is a sever loss of quality even if i give > the quality as 100. A quick scan of Go

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-22 Thread karthikr
Hi Guys, Im still not able to figure out the problem. When i try to use the Bitmaps compress method for PNG formats there doesnt seems to be any problem. But for JPEG format there is a sever loss of quality even if i give the quality as 100. Any inputs please. Regards, R.Karthik --~--~---

[android-developers] Re: Writing a Bitmap to a a outputstream

2009-08-22 Thread karthikr
Guys, Any help on the same? Regards, R.Karthik --~--~-~--~~~---~--~~ 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