Fix height of split double pages

This commit is contained in:
Jays2Kings 2021-10-15 16:48:44 -04:00
parent 3ee2f01428
commit d137dba785

View file

@ -302,7 +302,7 @@ object ImageUtil {
): ByteArrayInputStream {
val height = imageBitmap.height
val width = imageBitmap.width
val result = Bitmap.createBitmap(width / 2, height * 2, Bitmap.Config.ARGB_8888)
val result = Bitmap.createBitmap(width / 2, height, Bitmap.Config.ARGB_8888)
val canvas = Canvas(result)
progressCallback?.invoke(98)
canvas.drawBitmap(imageBitmap, Rect(if (!secondHalf) 0 else width / 2, 0, if (secondHalf) width else width / 2, height), result.rect, null)