I\'m looking for a solution for the following problem: how to change the size of a Bitmap
to a fixed size (for example 512x128). The aspect ratio of the bitmap conte
https://developer.android.com/reference/android/graphics/Bitmap.html#createScaledBitmap(android.graphics.Bitmap, int, int, boolean)
and make sure that both the dstWidth
and dstHeight
are obtained from src.getWidth()*scale
and src.getHeight()*scale
, where scale
is a value that you need to determine to make sure the scaled bitmap fits inside 512x128.