I'm rather new with ImageMagick and have been tasked with converting 700 TIFF images to jpg, no problem right?!
Most of them are fine, but a select few (around 25) do not show up either IE or Mozilla, even though they open up fine in every graphics program. Has anyone see this before?
I did note that the problem TIFFs are all 32 Bit color, 300x300 dpi, while all the ones that worked are only 8 bit. I tried to use the "-depth 8" to change it on the fly but that didn't work either.
Thanks for any help you can provide!
Some converted jpg from tiff files don't show in browser
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Some converted jpg from tiff files don't show in browser
What command did you try that failed?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Some converted jpg from tiff files don't show in browser
convert -quality 75 -resample 72x72 -depth 8 -geometry 230 -compress JPEG "...6HD719.tif" "...6HD719.jpg"
I tried it with and without -quality, -resample, -depth, and -geometry in efforts to avoid any issues. I also tried just tiff to tiff to reduce the depth to 8-bit which didn't work either. It did however reduce the dpi as instructed, it just didn't reduce the depth from 32-bit.
I tried it with and without -quality, -resample, -depth, and -geometry in efforts to avoid any issues. I also tried just tiff to tiff to reduce the depth to 8-bit which didn't work either. It did however reduce the dpi as instructed, it just didn't reduce the depth from 32-bit.
Re: Some converted jpg from tiff files don't show in browser
I don't think you need the -compress option, though that may not be the source of your woes.
Do the final jpg images otherwise display properly in other software?
When you compare the results of identify -verbose for the two types of tiff, what does it say about the compression?
Do the final jpg images otherwise display properly in other software?
When you compare the results of identify -verbose for the two types of tiff, what does it say about the compression?
Re: Some converted jpg from tiff files don't show in browser
The compression is the same. Here are the significant differences:
Good:
Type: Grayscale
Colorspace: Gray
Gray: 8-bit
Channel depth:
Compression: ColorBurn
Tiff:rows-per-strip: 12
Bad:
Type: ColorSeparation
Colorspace: CMYK
Channel depth:
Cyan: 1-bit
Magenta: 1-bit
Yellow: 1-bit
Black: 8-bit
Compression: ColorBurn
Tiff:rows-per-strip: 2
Could it be that these images aren't grayscale? This seems to be another common thread...
Good:
Type: Grayscale
Colorspace: Gray
Gray: 8-bit
Channel depth:
Compression: ColorBurn
Tiff:rows-per-strip: 12
Bad:
Type: ColorSeparation
Colorspace: CMYK
Channel depth:
Cyan: 1-bit
Magenta: 1-bit
Yellow: 1-bit
Black: 8-bit
Compression: ColorBurn
Tiff:rows-per-strip: 2
Could it be that these images aren't grayscale? This seems to be another common thread...
Re: Some converted jpg from tiff files don't show in browser
Do the bad jpgs display in applications other than a web-browser? For example, WindowsXP image preview or ImageMagick display?
Perhaps you should manually specify the colorspace (shot in the dark...):
Perhaps you should manually specify the colorspace (shot in the dark...):
Code: Select all
convert -colorspace CMYK -quality 75 -resample 72x72 -depth 8 -geometry 230 "...6HD719.tif" "...6HD719.jpg"
Re: Some converted jpg from tiff files don't show in browser
Sorry I forgot to address that again. Yes, they do open up fine in every graphics package.
Excellent. Your suggestion led me to look at the -colorspace option which requires the use of the -colors option. -colors set the preferred number of colors, and since I only need a grayscale image I went with 256 and RGB for the -colorspace, and the image displays perfectly.
I tried a few more with [borat]great success[/borat]!
Thanks much, I'm very grateful!
Excellent. Your suggestion led me to look at the -colorspace option which requires the use of the -colors option. -colors set the preferred number of colors, and since I only need a grayscale image I went with 256 and RGB for the -colorspace, and the image displays perfectly.
I tried a few more with [borat]great success[/borat]!
Thanks much, I'm very grateful!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Some converted jpg from tiff files don't show in browser
I also suggest you do your operations in the right order, otherwise IM has to make a guess. See Basics Page in IM examples.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/