bmp_file_reader.BMPFileReader
- class bmp_file_reader.BMPFileReader(file_handle)
Bases:
object
An object for reading a BMP image file.
- __init__(file_handle)
Creates a BMPFileReader from the given file handle.
The file handle must have been opened in read binary mode (“rb”).
- Parameters:
file_handle (io.TextIOWrapper) – The file handle of the BMP image to read.
Methods
__init__
(file_handle)Creates a BMPFileReader from the given file handle.
Returns the height of the image (in pixels).
get_row
(row)Reads in the pixels of the specified row (zero-indexed).
Returns the width of the image (in pixels).
Returns the BMP file header of the image.
Returns the DIB header of the BMP file.
- get_height()
Returns the height of the image (in pixels).
- Returns:
Height of the image in pixels.
- Return type:
- get_row(row)
Reads in the pixels of the specified row (zero-indexed).
- get_width()
Returns the width of the image (in pixels).
- Returns:
Width of the image in pixels.
- Return type:
- read_bmp_file_header()
Returns the BMP file header of the image.
- Returns:
BMP file header of the image.
- Return type: