转换png图像的位深度

时间:2015-03-17 16:21:42

标签: matlab png grayscale bit-depth

如何使用以下信息转换图像: ColorType:truecolor 格式:png bitDepth:24

到matlab中bitdepth = 8的png灰度图像?

1 个答案:

答案 0 :(得分:0)

来自imwrite

的文档
  

对于彩色图像,BitDepth值是每个平面的位数

你要求matlab写出3个颜色通道,每个通道有8位,结果是24位。如果您想要灰度,请先使用rgb2gray转换为灰度,然后再写。

相关问题