bmp565
bmp565 ¶
A class to read a 16-bit RGB565 BMP file and present it as a sliceable object.
Usage
bmp = BMP565('image.bmp') print(bmp.width, bmp.height, self.bpp) print(bmp[0]) # Get pixel color at 0 as an integer print(bmp[0, 0]) # Get pixel color at (0, 0) as an integer print(bmp[0:10]) # Get the first 10 lines as a memoryview object print(bmp[0:10, 0:10]) # Get a 10x10 slice of the image as a bytearray object