[英]Does PIL ImageEnhance library supports 16 bit JPG images
I am trying to save and display 16 bit JPG image.我正在尝试保存和显示 16 位 JPG 图像。 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:
当前的 Python Imaging Library 版本仅支持以下标准模式:
1 (1-bit pixels, black and white, stored with one pixel per byte) 1(1位像素,黑白,每字节一个像素存储)
L (8-bit pixels, black and white) L(8 位像素,黑白)
P (8-bit pixels, mapped to any other mode using a colour palette) P(8 位像素,使用调色板映射到任何其他模式)
RGB (3x8-bit pixels, true colour) RGB(3x8 位像素,真彩色)
RGBA (4x8-bit pixels, true colour with transparency mask) RGBA(4x8 位像素,带透明蒙版的真彩色)
CMYK (4x8-bit pixels, colour separation) CMYK(4x8 位像素,分色)
YCbCr (3x8-bit pixels, colour video format) YCbCr(3x8 位像素,彩色视频格式)
I (32-bit signed integer pixels) I(32 位有符号整数像素)
F (32-bit floating-point pixels) F(32 位浮点像素)
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.
Image.convert 方法从现有图像创建具有给定模式的新图像。 To know more about image attributes check the link and about full concept check the link .
要了解有关图像属性的更多信息,请查看链接,有关完整概念的信息,请查看链接。
Hope this helps you.希望这对你有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.