Python code to read .bmp info from header (work on Desktop Python and MicroPython)
This exercise read header of bmp file to get information about the image, such as image width and height, number of bit per pixel, specially offset, such that we can get the bitmap image later. This help me understanding more about bmp file structure. For the BMP file format, I reference https://en.wikipedia.org/wiki/BMP_file_format . Exercise Code: The Python code work on desktop Python and MicroPython, tested on: - Python 3.13.0 on Windows 11 - MicroPython v1.24.0 on Raspberry Pi Pico2 with RP2350 py_bmp_info.py """ Python/MicroPython exercise to read bmp file and get the bmp info, to understand the structure of bmp header. Work on both: - desktop Python (tested on Windows 11) .bmp image have to be save in 'images' directory under working directory. - MicroPython (tested on Raspberry Pi Pico2 with RP2350 running MicroPython v1.24.0 on 2024-10-25 ) .bmp files have to be saved in /images/ directory. To prepare the bmp using GIMP...