Resizing a bitmap to a fixed value but without changing the aspect ratio
问题 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 content must be preserved. I think it should be something like this: create an empty 512x128 bitmap scale the original bitmap down to fit the 512x128 pixels with keeping the aspect ratio copy the scaled into the empty bitmap (centered) What is the simplest way to achieve this? The reason for all this is, that the GridView messes the