NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Any package to populate image from raw data?



On Thu, 31 Dec 2020 at 16:54, Mayuresh <mayuresh%acm.org@localhost> wrote:
>
> I recently wrote a pyusb based driver to interact with an X ray camera.
> The driver gives me a byte array of a 16 bit grayscale image. I want to
> put this byte array into an image format. No specific format required as I
> can always convert it using ImageMagick.
>
> [The python pillow package almost did the job except for one glitch. This
> data is 16 bit grayscale data and pillow is able to handle only 8 bit data
> i.e. the image gets formed fine, but gets saved only with 8 bit depth. Saw
> posts somewhere saying that this is a limitation with pillow.]
>
> Looking for alternative to pillow to create image from byte array,
> preferably pkgsrc based, but otherwise is also fine. Python based
> preferably as the driver is in python, but otherwise is also fine.

Maybe https://pypi.org/project/tifffile/ - TIFF has supported 16bpp
for the last few decades :-p

David


Home | Main Index | Thread Index | Old Index