【问题标题】:How to convert greyscale bmp in imagemagick如何在imagemagick中转换灰度bmp
【发布时间】:2019-01-04 21:42:29
【问题描述】:

我正在尝试将灰度 png 转换为具有以下属性的位图(bmp3 版本):

Format: BMP3 (Microsoft Windows bitmap image (V3)) Class: PseudoClass Type: Grayscale Endianess: Undefined Colorspace: Gray Depth: 8-bit Channel depth: gray: 2-bit

问题是我需要上面的特定配置(由识别 -verbose test.bmp 获取)由 GIMP 制作,否则我从 imagemagick 获得的配置

Format: BMP3 (Microsoft Windows bitmap image (V3)) Class: PseudoClass Type: Bilevel Endianess: Undefined Colorspace: Gray Depth: 1-bit Channel depth: gray: 1-bit

把白色变成黑色。此图像正在发送到热敏打印机。

我用过以下:

convert test_tcl.png -colors 16 +dither -type bilevel BMP3:test.bmp

使用文件,我看到可以从设备正确打印的图像应该是以下格式:

$ file test_gimp3.bmp test.bmp: PC bitmap, Windows 3.x format, 192 x 192 x 8 而我的是:

$ file test.bmp test.bmp: PC bitmap, Windows 3.x format, 192 x 192 x 1

我怎样才能产生上面的输出(8bit/2bit)?

【问题讨论】:

    标签: imagemagick bmp


    【解决方案1】:

    所以我的问题在于调色板。

    当我使用时:

    $ convert test.png -type Optimize -compress none BMP3:test.bmp

    我得到了我需要的输出。

    【讨论】:

      猜你喜欢
      • 2013-05-05
      • 2020-03-21
      • 2015-06-29
      • 2017-01-17
      • 1970-01-01
      • 2020-01-07
      • 2012-10-30
      • 2019-12-03
      • 1970-01-01
      相关资源
      最近更新 更多