freetypy.Bitmap.convert

Bitmap.convert()

Convert a Bitmap to 8 bits per pixel. Given a Bitmap with depth 1bpp, 2bpp, 4bpp, or 8bpp converts it to one with depth 8bpp, making the number of used bytes per line (a.k.a. the ‘pitch’) a multiple of alignment.

Parameters:alignment (int, optional) – The pitch of the bitmap is a multiple of this parameter. Common values are 1, 2, or 4.
Returns:target – The bitmap, converted to 8bpp.
Return type:Bitmap