I tried to compress a Tiff image with group4 compression but the output image file is always a blank file.(1kb) Please help.
D:\ImageMagick\ImageMagick-6.7.0-Q16>convert -verbose -compress group4 d:\BNBP0001_2.tif d:\BNBP0006.tif
d:\BNBP0001_2.tif TIFF 1632x2327 1632x2327+0+0 8-bit Palette PseudoClass 256c 3.803MB 0.063u 0:00.062
d:\BNBP0001_2.tif=>d:\BNBP0006.tif TIFF 1632x2327 1632x2327+0+0 8-bit Bilevel PseudoClass 1c 566B 2.953u 0:02.687
compression group4 fail. Help! Critical
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: compression group4 fail. Help! Critical
try putting the input file before the compression
convert -verbose d:\BNBP0001_2.tif -compress group4 d:\BNBP0006.tif
see http://www.imagemagick.org/Usage/basics/#why
convert rose: -compress group4 rose.tif
identify -verbose rose.tif
Image: rose.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 70x46+0+0
Resolution: 72x72
Print size: 0.972222x0.638889
Units: Undefined
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.225776 (0.225776)
standard deviation: 0.418093 (0.418093)
kurtosis: -0.279223
skewness: 1.31178
Colors: 2
Histogram:
2493: ( 0, 0, 0) #000000 black
727: (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: 70x46+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
date:create: 2011-07-19T09:46:49-07:00
date:modify: 2011-07-19T09:46:49-07:00
signature: d07b78e11362abc266c33c81ad4549b3b8969a2d9dd76ae1dff60a41455d8915
tiff:document: rose.tif
tiff:endian: msb
tiff:photometric: min-is-white
tiff:rows-per-strip: 46
Artifacts:
verbose: true
Tainted: False
Filesize: 702BB
Number pixels: 3.22KB
Pixels per second: 53.7KB
User time: 0.000u
Elapsed time: 0:01.059
Version: ImageMagick 6.7.1-0 2011-07-16 Q16 http://www.imagemagick.org
freds-mac-mini:~ fred$
convert -verbose d:\BNBP0001_2.tif -compress group4 d:\BNBP0006.tif
see http://www.imagemagick.org/Usage/basics/#why
convert rose: -compress group4 rose.tif
identify -verbose rose.tif
Image: rose.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 70x46+0+0
Resolution: 72x72
Print size: 0.972222x0.638889
Units: Undefined
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.225776 (0.225776)
standard deviation: 0.418093 (0.418093)
kurtosis: -0.279223
skewness: 1.31178
Colors: 2
Histogram:
2493: ( 0, 0, 0) #000000 black
727: (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: 70x46+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
date:create: 2011-07-19T09:46:49-07:00
date:modify: 2011-07-19T09:46:49-07:00
signature: d07b78e11362abc266c33c81ad4549b3b8969a2d9dd76ae1dff60a41455d8915
tiff:document: rose.tif
tiff:endian: msb
tiff:photometric: min-is-white
tiff:rows-per-strip: 46
Artifacts:
verbose: true
Tainted: False
Filesize: 702BB
Number pixels: 3.22KB
Pixels per second: 53.7KB
User time: 0.000u
Elapsed time: 0:01.059
Version: ImageMagick 6.7.1-0 2011-07-16 Q16 http://www.imagemagick.org
freds-mac-mini:~ fred$
Re: compression group4 fail. Help! Critical
Hi Fmw42. Thanks for your reply.
But I am still experiencing the same problem. You can probably download the Tiff file from the following link and try it on your side.
http://www.2shared.com/photo/MbvkjooI/BNBP0001_2.html
Command as below.
convert -verbose d:\BNBP0001_2.tif -compress group4 d:\BNBP0006.tif
Thanks
But I am still experiencing the same problem. You can probably download the Tiff file from the following link and try it on your side.
http://www.2shared.com/photo/MbvkjooI/BNBP0001_2.html
Command as below.
convert -verbose d:\BNBP0001_2.tif -compress group4 d:\BNBP0006.tif
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: compression group4 fail. Help! Critical
You need to threshold the image first because group 4 converts to bilevel and all you get will be either totally white or black. The following works for me on IM 6.7.1.0 Q16 Mac OSX Tiger and the image is readable (but you can play with the threshold value). If it does not work for you, then identify your version of IM and perhaps upgrade.
convert BNBP0001_2.tif -threshold 50% -compress group4 BNBP0001_2_t50_g4.tif
identify -verbose BNBP0001_2_t50_g4.tif
Image: BNBP0001_2_t50_g4.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 1632x2327+0+0
Resolution: 200x200
Print size: 8.16x11.635
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.956026 (0.956026)
standard deviation: 0.205037 (0.205037)
kurtosis: 17.7868
skewness: -4.44823
Colors: 2
Histogram:
166998: ( 0, 0, 0) #000000 black
3630666: (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: 1632x2327+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
date:create: 2011-07-19T20:19:34-07:00
date:modify: 2011-07-19T20:19:34-07:00
signature: d5bb9a812cc538d86d86c90db24b3663f5eadd29b180862e627a37090af48393
tiff:document: BNBP0001_2_t50_g4.tif
tiff:endian: msb
tiff:photometric: min-is-white
tiff:rows-per-strip: 2327
tiff:software: IrfanView
Artifacts:
verbose: true
Tainted: False
Filesize: 27.3KBB
Number pixels: 3.798MB
Pixels per second: 25.32MB
User time: 0.120u
Elapsed time: 0:01.150
Version: ImageMagick 6.7.1-0 2011-07-16 Q16 http://www.imagemagick.org
freds-mac-mini:~ fred$
convert BNBP0001_2.tif -threshold 50% -compress group4 BNBP0001_2_t50_g4.tif
identify -verbose BNBP0001_2_t50_g4.tif
Image: BNBP0001_2_t50_g4.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 1632x2327+0+0
Resolution: 200x200
Print size: 8.16x11.635
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.956026 (0.956026)
standard deviation: 0.205037 (0.205037)
kurtosis: 17.7868
skewness: -4.44823
Colors: 2
Histogram:
166998: ( 0, 0, 0) #000000 black
3630666: (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: 1632x2327+0+0
Dispose: Undefined
Iterations: 0
Compression: Group4
Orientation: TopLeft
Properties:
date:create: 2011-07-19T20:19:34-07:00
date:modify: 2011-07-19T20:19:34-07:00
signature: d5bb9a812cc538d86d86c90db24b3663f5eadd29b180862e627a37090af48393
tiff:document: BNBP0001_2_t50_g4.tif
tiff:endian: msb
tiff:photometric: min-is-white
tiff:rows-per-strip: 2327
tiff:software: IrfanView
Artifacts:
verbose: true
Tainted: False
Filesize: 27.3KBB
Number pixels: 3.798MB
Pixels per second: 25.32MB
User time: 0.120u
Elapsed time: 0:01.150
Version: ImageMagick 6.7.1-0 2011-07-16 Q16 http://www.imagemagick.org
freds-mac-mini:~ fred$