Reading bmp files in Python

前端 未结 7 1274
北荒
北荒 2021-02-19 01:41

Is there a way to read in a bmp file in Python that does not involve using PIL? PIL doesn\'t work with version 3, which is the one I have. I tried to use the Image object from g

7条回答
  •  生来不讨喜
    2021-02-19 01:58

    I had to work on a project where I needed to read a BMP file using python, it was quite interesting, actually the best way is to have a review on the BMP file format (https://en.wikipedia.org/wiki/BMP_file_format) then reading it as binairy file, to extract the data.

    You will need to use the struct python library to perform the extraction

    You can use this tutorial to see how it proceeds https://youtu.be/0Kwqdkhgbfw

提交回复
热议问题