Reading bmp files in Python

前端 未结 7 1304
北荒
北荒 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

    It depends what you are trying to achieve and on which platform?

    Anyway using a C library to load BMP may work e.g. http://code.google.com/p/libbmp/ or http://freeimage.sourceforge.net/, and C libraries can be easily called from python e.g. using ctypes or wrapping it as a python module.

    or you can compile this version of PIL https://github.com/sloonz/pil-py3k

提交回复
热议问题