The bitmap is a standard large size image as per taken from the camera. I can generate the screen size image using similar code to the gallery. The problem is that I want to save the final image at normal size (2056x1536, hell I would even settle for 1024x768). To do that I need to create a second bitmap that I can use as the canvas - this is where it always dies. I have code that does pixel by pixel translation but its considerably slower than using colormatrixes. and a canvas.
On Feb 26, 2:39 pm, Mattaku Betsujin <mattaku.betsu...@gmail.com> wrote: > I think the best solution to handle very large bitmaps is to be able to > decode only a small chunk of the bitmap at a time and process it. > > Does anyone know if the existing Android API can support this? > > If not, probably one solution is to write a smart decoder (in Java, so slow > :-( ....) that can decode a small chunk. > > On Thu, Feb 26, 2009 at 11:32 AM, Tomei Ningen <tomei.nin...@yahoo.com>wrote: > > > > > You're running into memory fragmentation problems. Bitmap memory is > > not allocated from the Java object heap. Instead, it's allocated from > > the 'malloc' heap. That's why you don't see the Java heap expanding. > > > How big is your bitmap? If you're processing JPEG files, probably it > > will be better to read the thumbnail directly from the JPEG file. This > > way you don't need to create the Bitmap at all. > > > On Feb 26, 9:47 am, "bra...@gmail.com" <peacoc...@gmail.com> wrote: > > > Ok I am at the end of my rope. > > > > I am doing some image processing. I have a large image file which I > > > open and create a smaller bitmap from. At the end of processing I call > > > recycle on everything. I null everything. I run GC manually. > > > > I then try edit another image and I get an out of VM memory error. > > > Bitmap exceeds etc etc. > > > > I am looking at the heap and the secone edit doesnt seem to cause it > > > to increase at all. > > > > What else can I do. Surely google cannot possibly be suggesting that > > > we can open one large bitmap per session and thats it? > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---