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