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 details)
Built Distribution
pybmp2-1.0-py3-none-any.whl
(3.6 kB
view details)
File details
Details for the file pybmp2-1.0.tar.gz
.
File metadata
- Download URL: pybmp2-1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.21.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/19.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b5aa5c2a608b106b75de0420743d636ec9587a0daf6fb84aeb571e554a87c1 |
|
MD5 | 58a4dc4daf683a645e6893b6b930490d |
|
BLAKE2b-256 | 4b82b3619feafef6859af766dd10633ad16eb37f9641b8f8329b65dbe3f469aa |
File details
Details for the file pybmp2-1.0-py3-none-any.whl
.
File metadata
- Download URL: pybmp2-1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.21.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/19.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a04aaef8cb9d9c18f30bdbbbd0209f865c9e5682074b096c31539734b2c96fb4 |
|
MD5 | 8df78741e1c69b0ebe4d30b324c1de34 |
|
BLAKE2b-256 | aafff32cd3399460aa9567f09a636fe2014d3c169fdd10391fa74a6e26f457a3 |