freetypy.Bitmap¶
-
class
freetypy.Bitmap¶ Describes a bitmap raster.
Bitmapsupports the Python buffer interface, so it is easy to convert it to a Numpy array. For example:>>> import numpy as np >>> a = np.asarray(bitmap)
-
__init__()¶ x.__init__(...) initializes x; see help(type(x)) for signature
Methods
convertConvert a Bitmapto 8 bits per pixel.to_list⨎ Convert the bitmap to a nested list. Attributes
bufferGet the bitmap’s contents as a buffer. num_graysThe number of gray levels used in the bitmap. pitchThe number of bytes taken by one bitmap row. pixel_modeThe PIXEL_MODE, i.e., how pixel bits are stored.rowsThe number of bitmap rows. widthThe number of pixels in bitmap row. -