BitmapRegionDecoder - inverse usage to build together a new image

126 Views Asked by At

I want to make a crop function with no quality loss. Therefore I load an image in a lower quality and reload parts of the image with the BitmapRegionDecoder to display tiles in a good resolution. So far so good, displaying is working fine like that.

Now I want to offer a loss less crop function, meaning the user can select which region of the image should be cropped - based on a tile of an image or a lower quality "preview". Based on this I can calculate the desired region the user wants to crop out in real bitmap coordinates.

Let's say the bitmap is 20000x20000 and I want to crop the region of the size 15000x15000, representing the center of the main image, how can I do that?

I know how to do that if the complete bitmap is loaded, but I don't know how to do it without.

How can I create a bitmap from tiles in a memory friendly way?

0

There are 0 best solutions below