A easy class for save the data by the img
the main class is ImData.
Advice: Use python that later than 3.5, no support for 2.7
Imdata.bytes_pix(bs, size, encode='utf-8')
if bs is a string, use 'encode' to encode the string.
size is the size of the img, such as (40, 80).
size is not for the length of the bs, it's about 1.4 bigger than the length.
for eample, if bytes is like b'my bytes', size at least should be (3,4) instead of (2,4)
The pix is the np.array object. Use
import numpy as np; pix = np.array(...).
encode for the bytes type, is want a string.
Read from the image, notice that do not read a unsupport picture.
ImData.save(uri, bytes=None, size, format)
Save the bytes to the image.
format can only be in 'tif', 'tiff', 'png' but not for 'jpg', 'jpeg', 'gif' and so on.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size imdata-0.0.2-py3-none-any.whl (4.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size imdata-0.0.2.tar.gz (4.1 kB)||File type Source||Python version None||Upload date||Hashes View|