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?



You can build something with the Go image package quite easily. Create an image in memory and fill it with raw values, then write to an image format of your choice. If you prefer C++, OpenCV can do this too.

Mayuresh <mayuresh%acm.org@localhost> schrieb am Do. 31. Dez. 2020 um 17:54:
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.

--
Mayuresh
--
Benny


Home | Main Index | Thread Index | Old Index