I tried this for some time, I would like to create wallpaper from Bitmap . Say the desired wallpaper size is 320x480, and the size of the original image is 2048x2048.
I'm not sure if the term βfit to fitβ is appropriate, but what I would like to achieve is to get most of the image that is equally related to the size of the wallpaper (320x480).
So, in this case, I would like to get 2048x1365 or (1365.333 ... to be precise) from the Bitmap source and scale it to 320x480.
The method I tried:
1) Crop the bitmap first to 2048x1365
bm = Bitmap.createBitmap(bm, xOffset, yOffset, 2048, 1365);
2) Zoom to 320x480
bm = Bitmap.createScaledBitmap(bm, 320, 480, false);
which caused the OutOfMemory error.
Is there any way to achieve this?
Hi,
dezull
dezull
source share