Possible bug convert 24-bit Tiff to 8-bit Tiff IM 6.8.6.7
Posted: 2013-08-01T13:39:20-07:00
IM 6.8.6.7 Q16 Mac OSX
Reference: viewtopic.php?f=1&t=23844&p=101359#p101359
Convert an 24-bit compressed TIFF to 8-bit compressed TIFF only works in special circumstances.
Test:
Create compressed tiff:
convert rose: -compress jpeg rose_cjpg.tiff
Type: TrueColor
Depth: 8-bit
Remove compression and convert to type palette, but result is still truecolor:
convert rose_cjpg.tiff -compress none -depth 8 -type palette rose_cjpg_cnone_palette.jpg
or reversing the order of -depth and -type
convert rose_cjpg.tiff -compress none -type palette -depth 8 rose_cjpg_cnone_palette.jpg
Type: TrueColor
Depth: 8-bit
Try writing to MIFF and then to TIFF, but result is depth 16:
convert rose_cjpg.tiff -compress none MIFF:- | convert - -depth 8 -type palette rose_cjpg_cnone_palette2.tiff
Type: Palette
Depth: 16-bit
Reverse -depth and -type, finally works.
convert rose_cjpg.tiff -compress none MIFF:- | convert - -type palette -depth 8 rose_cjpg_cnone_palette3.tiff
Type: Palette
Depth: 8-bit
Why does it not work without going to MIFF first?
Why does the order of -type -depth matter?
Reference: viewtopic.php?f=1&t=23844&p=101359#p101359
Convert an 24-bit compressed TIFF to 8-bit compressed TIFF only works in special circumstances.
Test:
Create compressed tiff:
convert rose: -compress jpeg rose_cjpg.tiff
Type: TrueColor
Depth: 8-bit
Remove compression and convert to type palette, but result is still truecolor:
convert rose_cjpg.tiff -compress none -depth 8 -type palette rose_cjpg_cnone_palette.jpg
or reversing the order of -depth and -type
convert rose_cjpg.tiff -compress none -type palette -depth 8 rose_cjpg_cnone_palette.jpg
Type: TrueColor
Depth: 8-bit
Try writing to MIFF and then to TIFF, but result is depth 16:
convert rose_cjpg.tiff -compress none MIFF:- | convert - -depth 8 -type palette rose_cjpg_cnone_palette2.tiff
Type: Palette
Depth: 16-bit
Reverse -depth and -type, finally works.
convert rose_cjpg.tiff -compress none MIFF:- | convert - -type palette -depth 8 rose_cjpg_cnone_palette3.tiff
Type: Palette
Depth: 8-bit
Why does it not work without going to MIFF first?
Why does the order of -type -depth matter?