Ran into sort of the same problem myself whilst developing an image
gallery - my problem was that loading thumbnails of 5 or so of the
images caused an out of memory error. Luckily I was able to implement
inJustDecodeBounds and inSampleSize to reduce the quality of my
thumbnails and that solved it in my case.

In your case, you're just going to have to put a maximum limit on the
memory of an image that your app will take. If the input source is
larger than this then use inSampleSize to scale it. However it does
you will mean unable to save the image at the same size as the source
image, but from my experience this is common among mobile photo
editing apps (going back a bit, the LG Viewty for instance could take
5MP photos, but I think the photo editing app could only save them at
around the resolution of 1MP).

The other option might be to see if it is possible to load only
portions of the bitmap (or you could cut it up before opening it in
your program) and the piece these back together in a similar fashion
to the Google Map tiles.

On Jul 22, 1:12 pm, ReyLith <jesus...@gmail.com> wrote:
> Hi,
>
> I'm developing an image editor for Android. When I do some operations
> with small pictures (600x600 - 1024x768), the program work well. But
> when I do some opeations with big pictures, I always obtain an
> OutOfMemory Error. I read read many post trying to have the image in
> memory. Also I looked at the Android's Gallery, trying to simulate the
> effect of loading the image with lower quality and get the complete
> quality after a while. But I doesn't get to work with large images.
>
> I thought of using the parameter inSampleSize but I raised the problem
> of having to perform operations on the image and save it with the
> original size, so it no longer serves me. The only thing I've done is
> use the parameter inJustDecodeBounds and display an error to the user
> if the image exceeds the available memory.
>
> Is there any possibility of working with large images with no memory
> problems?
>
> I need urgent help. Thank you very much in advance. Thanks,
>
> JESÚS

-- 
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

Reply via email to