You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug: Currently overlay bitmap is scaled by baseBitmap dimens
Line 217 of file BitmapmergerTask.java has to change from: Bitmap overlayScaled = Bitmap.createScaledBitmap(overlayBitmap, (int) (baseBitmap.getWidth() * scale), (int) (baseBitmap.getHeight() * scale), true);
to Bitmap overlayScaled = Bitmap.createScaledBitmap(overlayBitmap, (int) (overlayBitmap.getWidth() * scale), (int) (overlayBitmap.getHeight() * scale), true);
Another improvement: Bitmap workingBitmap = Bitmap.createBitmap(baseBitmap); Bitmap mutableBitmap = workingBitmap.copy(Bitmap.Config.ARGB_8888, true);
Above code generates 2 bitmaps and 'workingBitmap' is no need (waste of memory). We can modify it to: Bitmap mutableBitmap = baseBitmap.copy(Bitmap.Config.ARGB_8888, true);
The text was updated successfully, but these errors were encountered:
@toandk Thanks for raising it. You can send a pull request modifying the above changes if you wish. I would take sometime to do it if you want me to change myself.
I found a bug: Currently overlay bitmap is scaled by baseBitmap dimens
Line 217 of file BitmapmergerTask.java has to change from:
Bitmap overlayScaled = Bitmap.createScaledBitmap(overlayBitmap, (int) (baseBitmap.getWidth() * scale), (int) (baseBitmap.getHeight() * scale), true);
to
Bitmap overlayScaled = Bitmap.createScaledBitmap(overlayBitmap, (int) (overlayBitmap.getWidth() * scale), (int) (overlayBitmap.getHeight() * scale), true);
Another improvement:
Bitmap workingBitmap = Bitmap.createBitmap(baseBitmap); Bitmap mutableBitmap = workingBitmap.copy(Bitmap.Config.ARGB_8888, true);
Above code generates 2 bitmaps and 'workingBitmap' is no need (waste of memory). We can modify it to:
Bitmap mutableBitmap = baseBitmap.copy(Bitmap.Config.ARGB_8888, true);
The text was updated successfully, but these errors were encountered: