在我们当前的工作流程中,我们使用ImageMagick 6.7将tif图像转换为jp2000,并使用bookviewer显示jp2000图片,但是转换后的图像的颜色总是比tif文件更灰,我尝试了imageMagick的类型选项参数TrueColor并在命令行中分别将sRGB和colorspace sRGB一起使用,它仍然无法解决问题。这是我用来批量转换的命令:
mogrify -format jp2 -colorspace sRGB -type TrueColor -path {file}
这是tif文件信息的详细信息,
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 3416x4488+0+0
Resolution: 400x400
Print size: 8.54x11.22
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: LSB
Colorspace: RGB
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Gray:
min: 0 (0)
max: 1 (1)
mean: 0.762666 (0.762666)
standard deviation: 0.425449 (0.425449)
kurtosis: -0.475339
skewness: -1.23477
Colors: 2
Histogram:
3638570: ( 0, 0, 0) #000000 black
11692438: (255,255,255) #FFFFFF white
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 3416x4488+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
comment: 0030\0060\00001890.tif
date:create: 2018-12-18T11:09:35-05:00
date:modify: 2018-12-18T11:09:35-05:00
signature: 2e4752f9eed1faeea038a7f33c562901502146ecdced65d2955751e549614fb2
tiff:artist: The Crowley Company
tiff:endian: lsb
tiff:photometric: min-is-white
tiff:rows-per-strip: 19
tiff:software: Kofax standard Multi-Page TIFF Storage Filter v3.03.000
tiff:timestamp: 2011:05:06 23:45:16
Artifacts:
verbose: true
Tainted: False
Filesize: 1.917MBB
Number pixels: 15.33MB
Pixels per second: 102.2MB
User time: 0.070u
Elapsed time: 0:01.150
Version: ImageMagick 6.7.2-7 2017-03-22 Q16 http://www.imagemagick.org
这是转换后的jp2文件信息
Image: 101083016_00009_00004_00119.jp2
Format: JP2 (JPEG-2000 File Format Syntax)
Class: DirectClass
Geometry: 3379x4443+0+0
Resolution: 72x72
Print size: 46.9306x61.7083
Units: Undefined
Type: Bilevel
Base type: Bilevel
Endianess: Undefined
Colorspace: RGB
Depth: 2/1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Gray:
min: 0 (0)
max: 3 (1)
mean: 2.69697 (0.898989)
standard deviation: 0.904028 (0.301343)
kurtosis: 5.01231
skewness: -2.64808
Colors: 2
Histogram:
1516462: ( 0, 0, 0) #000000 black
13496435: (255,255,255) #FFFFFF white
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Compose: Over
Page geometry: 3379x4443+0+0
Dispose: Undefined
Iterations: 0
Compression: JPEG2000
Orientation: Undefined
Properties:
date:create: 2019-04-04T17:33:24-04:00
date:modify: 2019-04-04T17:33:24-04:00
signature: c5a16ea080389f3909f1ca87c4d0cc752b87af8c9fd24ad1a222b94904bf6950
Profiles:
Profile-icc: 394 bytes
Restricted ICC profile describing sRGB-grey
Artifacts:
verbose: true
Tainted: False
Filesize: 364KBB
Number pixels: 15.01MB
Pixels per second: 7.082MB
User time: 1.000u
Elapsed time: 0:03.120
Version: ImageMagick 6.7.2-7 2017-03-22 Q16 http://www.imagemagick.org
有人可以向我指出如何使jp2颜色保持白色,或者应使用哪些选项来防止转换后的jp2000变成灰色?谢谢!