I'm processing multipage TIFF faxes.
The processing involves splitting the document into single pages (Cygwin's TIFFSPLIT.EXE) and adding a banner to the top and bottom of the page (Image Magick's CONVERT.EXE).
The problem I'm getting is that the ColorMap in the resulting TIF files is inconsistent.
Below are 2 consecutive files. Both operated on in the same way.
Code: Select all
Image: 2009-09-29__08-19__Page-0025__67S9M0B.tif
Format: TIFF (Tagged Image File Format)
Class: PseudoClass
Geometry: 1728x2408+0+0
Resolution: 204x196
Print size: 8.47059x12.2857
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: MSB
Colorspace: RGB
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 1 (1)
mean: 0.865593 (0.865593)
standard deviation: 0.341089 (0.341089)
kurtosis: 2.59538
skewness: -2.14368
Histogram:
559270: ( 0, 0, 0) #000000 black
3601754: (255,255,255) #FFFFFF white
Colormap: 2
0: ( 0, 0, 0) #000000 black
1: (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
Page geometry: 1728x2408+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
date:create: 2009-09-29T08:19:41+01:00
date:modify: 2009-09-29T08:19:48+01:00
signature: bf69ed91682961201d6c4bf112814eee2b066312f364cd1580f64a376f3be010
tiff:document: Z:\Faxes\Received\2009\09\29\2009-09-29__08-19__Page-0025__67S9M0B.tif
tiff:photometric: palette
tiff:rows-per-strip: 2408
tiff:software: ImageMagick 6.5.6-5 2009-09-25 Q8 OpenMP http://www.imagemagick.org
Artifacts:
verbose: true
Tainted: False
Filesize: 93.2kb
Number pixels: 3.968mb
Pixels per second: 50.88mb
User time: 0.031u
Elapsed time: 0:01
Version: ImageMagick 6.5.6-5 2009-09-25 Q8 OpenMP http://www.imagemagick.org
Code: Select all
Image: 2009-09-29__08-15__Page-0024__5YWMILJ.tif
Format: TIFF (Tagged Image File Format)
Class: PseudoClass
Geometry: 1728x2508+0+0
Resolution: 204x196
Print size: 8.47059x12.7959
Units: PixelsPerInch
Type: Bilevel
Base type: Bilevel
Endianess: MSB
Colorspace: RGB
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
gray:
min: 0 (0)
max: 1 (1)
mean: 0.898321 (0.898321)
standard deviation: 0.302226 (0.302226)
kurtosis: 4.94801
skewness: -2.63591
Histogram:
440661: ( 0, 0, 0) #000000 black
3893163: (255,255,255) #FFFFFF white
Colormap: 2
0: (255,255,255) #FFFFFF white
1: ( 0, 0, 0) #000000 black
Rendering intent: Undefined
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 1728x2508+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
date:create: 2009-09-29T08:16:29+01:00
date:modify: 2009-09-29T08:17:08+01:00
signature: beb7404299155673335d71255e4e5294bf033321a0531e681a613893cb3ff97d
tiff:document: Z:\Faxes\Received\2009\09\29\2009-09-29__08-15__Page-0024__5YWMILJ.tif
tiff:photometric: palette
tiff:rows-per-strip: 2508
tiff:software: ImageMagick 6.5.6-5 2009-09-25 Q8 OpenMP http://www.imagemagick.org
Artifacts:
verbose: true
Tainted: False
Filesize: 39.1kb
Number pixels: 4.133mb
Pixels per second: 65.6mb
User time: 0.047u
Elapsed time: 0:01
Version: ImageMagick 6.5.6-5 2009-09-25 Q8 OpenMP http://www.imagemagick.org
The faxes go to an external business and they are complaining.
How can I set the ColorMap appropriately?
The command I'm using to process the tiff file is
Code: Select all
CONVERT "Z:\Faxes\received\2009\09\29\2009-09-29__15-24__Page-0828__5O9MTJU1.tif" -resize 1728 -bordercolor black -fill black -border 0x100 -draw "fill white stroke black stroke-width 1 rectangle 0,0 1727,99 fill black rectangle 0,0 339,99 rectangle 1420,0 1727,99 fill black font Consolas font-size 60 stroke white stroke-width 4 text 5,44 '2009/09/29' text 88,94 '15:24' font-size 140 text 1422,94 '0828' fill white font-size 110 stroke black text 430,76 '5 O 9 M T J U 1'" -rotate 180 -draw "fill white stroke black stroke-width 1 rectangle 0,0 1727,99 fill black rectangle 0,0 339,99 rectangle 1420,0 1727,99 fill black font Consolas font-size 60 stroke white stroke-width 4 text 5,44 '2009/09/29' text 88,94 '15:24' font-size 140 text 1422,94 '0828' fill white font-size 110 stroke black text 430,76 '5 O 9 M T J U 1'" -rotate 180 -units PixelsPerInch -density 204x196 -define quantum:polarity=min-is-black -monochrome -type Bilevel -compress Group4 "Z:\Faxes\Received\2009\09\29\2009-09-29__15-24__Page-0828__5O9MTJU1.tif"
The important parts of the command are
Code: Select all
-define quantum:polarity=min-is-black -monochrome -type Bilevel -compress Group4
I'm wondering if the order is important here.
Should -define be in a different position to the other settings?
Any help would be appreciated.
Regards,
Richard Quadling.