Python package to read a BMP file's header and pixel array in binary.
Project description
Py BMP
Python package to read a BMP file's header and pixel array in binary.
Install Instructions
pip install pybmp2
Usage
from pybmp2 import BMP
img = BMP(filename="sample.bmp")
print(img.SHAPE)
print(img.PIXELARRAY)
print(img.RAWIMGSIZE)
from pybmp import BMP
import binascii
f = open('samp.bmp','rb')
content = f.read()
content = binascii.hexlify(content)
img = BMP(hexdata=hexdata)
print(img.SHAPE)
print(img.PIXELARRAY)
print(img.RAWIMGSIZE)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybmp2-1.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
pybmp2-1.0-py3-none-any.whl
(3.6 kB
view hashes)