The size of the JPG/PNG file has almost nothing to do with the size of the corresponding image in memory. An RGB_565 takes 2 bytes per pixel (5+6+5=16bits=2bytes). An ARGB_8888 takes 4 bytes per pixel. This means a 5MPixel image will take 5M*2 = 10MByte in RAM when using RGB_565 or 5M*4=20MByte in RAM when using ARGB_8888.
I have an image editor in the market and I managed to process full-sized images, reverting back to RGB_565 when necessary. My image editor only applies *linear *filters. I.e. filters that modify every pixel in an image the same way, regardless of the pixel's position or its neighbors. This allows my app to chop up large images into smaller ones and deal with the smaller ones one by one. If not, i would need, at some point in time 2 copies of the image: The original and the modified. On Wednesday, April 18, 2012 6:07:54 PM UTC-4, Spooky wrote: > > On Thu, Apr 19, 2012 at 01:55:18AM +0400, Kostya Vasilyev wrote: > > On 04/19/2012 12:39 AM, Jim Graham wrote: > > >I doubt that. I'm working with full-sized and near-full-sized images > > >(3 MP//2048x1536 or 5 MP//2592x1944) and those are around 750 kB and 1.1 > > >MB, respectively (give or take a few hundred kB). I can't remember > which > > >I was working with at the time, but whichever one it was, logcat showed > > >the system allocating 10 MB for it. > > > > What color depth are your images at? > > ARGB_8888. Again, when working on a camera app that's intended as much > for serious photography as the goofy side, why shoot myself in the foot > by immediately throwing image quality out the window? > > > 3 MP (milli pixels?) at 24 bit per pixel, RGB_888, is 9 megabytes. > > No...the person who replied had written it as mb ... I corrected it > before replying to it. I don't think there is such thing as a mp (or > a mb, for that matter ... and if there is, I'd LOVE to know what use it > is). > > > 5 millipixels at 24 bit is 15 megabytes. > > I think you meant MP. :-) > > > Not 750 kB and 1.1 MB. > > And since he'd referred to JPG sizes, that's what *I* was referring to, > not bitmap sizes (I think I included bitmap sizes in there, as well, but > specified bitmap, not jpeg. And yes, I did two samples, one at each > resolution, both saved as a JPG, and those WERE the respective file > sizes. I didn't just dream those up. Oh, and *NONE* of the photos > I've taken, even at 5 MP, ended up being 15 MB jpegs (at least, none > so far). > > Later, > --jim > > -- > THE SCORE: ME: 2 CANCER: 0 > 73 DE N5IAL (/4) | "My spell checker eloped with a wiccan > spooky1...@gmail.com | and I've not seen it since!" > < Running FreeBSD 7.0 > | > ICBM / Hurricane: | (from news.admin.net-abuse.email) > 30.44406N 86.59909W | > > Android Apps Listing at http://www.jstrack.org/barcodes.html > > -- 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