简体   繁体   中英

Does PIL ImageEnhance library supports 16 bit JPG images

I am trying to save and display 16 bit JPG image. but getting error like

image has wrong mode .

If Supported, then what will be the mode?

Check this

The mode (this is a string specifying the pixel format used by the image) of an image defines the type and depth of a pixel in the image. The current Python Imaging Library release only supports the following standard modes:

1 (1-bit pixels, black and white, stored with one pixel per byte)

L (8-bit pixels, black and white)

P (8-bit pixels, mapped to any other mode using a colour palette)

RGB (3x8-bit pixels, true colour)

RGBA (4x8-bit pixels, true colour with transparency mask)

CMYK (4x8-bit pixels, colour separation)

YCbCr (3x8-bit pixels, colour video format)

I (32-bit signed integer pixels)

F (32-bit floating-point pixels)

This may be the reason you are getting the above error. The Image.convert method creates, from an existing image, a new image with a given mode. To know more about image attributes check the link and about full concept check the link .

Hope this helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM