2

I'm creating somekind of 2D image editor in Android and I have the big problem of big files don't fit in memory.

I need to zoom in/out the image put some shapes and then save it.

My question is:

How can I load the image and save it without getting out of memory? I've been reading about bitmapregiondecode and the sample technic but there's must be another solution. How can I save the image if I always use regiondecode?

The images need good detail quality because it's architectural images... and the lines must be well defined.

I'm new to this, help me please.

Arun Kumar
  • 6,534
  • 13
  • 40
  • 67
Bruno Nunes
  • 103
  • 1
  • 7

1 Answers1

0

Note two things while dealing with images:

tempBitmap = Bitmap.createBitmap(bit);

clone the bitmap which you are using for zoom and other operations but wont use the original because it looses its clarity when you save;

when done with bitmap give
bit.recycle(); to release the memory space

Sandeep P
  • 4,291
  • 2
  • 26
  • 45