Conversion with Blending Layer Issues (tif to jpg)
Conversion with Blending Layer Issues (tif to jpg)
The below #1 argument has worked for thousands of images but recently tif files containing a blending layer have resulted in the following issue:
Original file: https://www.dropbox.com/s/iazfiswmn6yu8 ... 7.tif?dl=0
PNG preview of original:
#1 Failed Conversion Argument: -quality 85 -flatten
#2 Failed Conversion Argument: -quality 85 -layers merge
#3 Failed Conversion Argument: -alpha off/deactivate -quality 85 -layers merge
#4 Failed Conversion Argument: -alpha remove -background white -quality 85
This last one, #4, is about what we're looking for minus the black background (sometimes dark grey background). Grateful for any suggestions on how we might make the #4 argument produce a white background. Or even better, an adjustment to the original argument #1, that works.
Original file: https://www.dropbox.com/s/iazfiswmn6yu8 ... 7.tif?dl=0
PNG preview of original:
#1 Failed Conversion Argument: -quality 85 -flatten
#2 Failed Conversion Argument: -quality 85 -layers merge
#3 Failed Conversion Argument: -alpha off/deactivate -quality 85 -layers merge
#4 Failed Conversion Argument: -alpha remove -background white -quality 85
This last one, #4, is about what we're looking for minus the black background (sometimes dark grey background). Grateful for any suggestions on how we might make the #4 argument produce a white background. Or even better, an adjustment to the original argument #1, that works.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Conversion with Blending Layer Issues (tif to jpg)
The file contains three images, of different sizes. I suppose you want only the first image, and don't want to flatten them together.
Does that do what you want?
Code: Select all
convert "Aviator_Brown Gold_Mic 3_Snake&S6AVFM-157.tif"[0] x.png
snibgo's IM pages: im.snibgo.com
Re: Conversion with Blending Layer Issues (tif to jpg)
Ignore the different sizes. The different images are the outcomes of the various conversion arguments we tried on the original file.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
What is your IM version and platform/OS, since syntax may vary. Please always provide that.
What were your exact full command lines?
What were your exact full command lines?
Re: Conversion with Blending Layer Issues (tif to jpg)
Version: 7.0.1
Commands:
- 1. convert -quality 85 -flatten file.tif -resize 2400x2400 file.jpg
- 2. convert -quality 85 -layers merge file.tif -resize 2400x2400 file.jpg
- 3. convert -alpha off/deactivate -quality 85 -layers merge file.tif -resize 2400x2400 file.jpg
- 4. convert -alpha remove -background white -quality 85 file.tif -resize 2400x2400 file.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
Your syntax is wrong. Put the input image right after convert. Also you did not say what platform you are on.
JPG output does not support transparency. Try saving to PNG. Or flatten against a white background.
JPG output does not support transparency. Try saving to PNG. Or flatten against a white background.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
try
or
Code: Select all
convert -quiet "Aviator_Brown Gold_Mic 3_Snake&S6AVFM-157.tif" -background none -flatten test.png
Code: Select all
convert -quiet "Aviator_Brown Gold_Mic 3_Snake&AVFM-157.tif" -background white -flatten -quality 85 test.jpg
Re: Conversion with Blending Layer Issues (tif to jpg)
Platform Windows Server 2012
We have a GUI in front of the convert.exe that places the file names in the correct spots, but otherwise doesn't impact/alter the arguments. What I typed above was my best guess at how it's structuring the full commands as the GUI only provides us options to supply the arguments.
But I feel like this is all beside the point... the conversions process, it's the arguments were supplying and the above image results that are the issue.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
Try my commands above. And note that JPG does not support transparency, so you need to choose a color or it will default to black. If my commands do not produce the correct results for you, please let me know what is incorrect.
You may need to change your GUI, if it is not reading the input image in the correct location in your command line.
You may need to change your GUI, if it is not reading the input image in the correct location in your command line.
Re: Conversion with Blending Layer Issues (tif to jpg)
Boom, these both work! Genuinely surprised we were able to get help with this. Very grateful, thank you. If you want some headphones/earbuds from one of our companies skullcandy/astrogaming, PM me and I'll make it happen.fmw42 wrote: ↑2017-02-09T13:02:53-07:00 try
orCode: Select all
convert -quiet "Aviator_Brown Gold_Mic 3_Snake&S6AVFM-157.tif" -background none -flatten test.png
Code: Select all
convert -quiet "Aviator_Brown Gold_Mic 3_Snake&AVFM-157.tif" -background white -flatten -quality 85 test.jpg
Thanks again
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
The other issue is that your TIFF is CMYKA. That is probably why your images look reversed. You would be better off convert them to RGB for your output using profiles to get the best results.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
I am surprised that PNG works, since it does not support CMYK colorspace.
EDIT: It looks like IM was smart enough to convert the result to sRGB before saving to PNG.
EDIT: It looks like IM was smart enough to convert the result to sRGB before saving to PNG.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Conversion with Blending Layer Issues (tif to jpg)
If you want to convert to sRGB (since many viewers to not properly view CMYK, especially without a profile), then try (unix syntax)
For Windows replace newline symbol \ with ^ And use your own paths to your profiles.
Code: Select all
convert -quiet "Aviator_Brown Gold_Mic 3_Snake&S6AVFM-157.tif" \
-profile /Users/fred/images/profiles/USWebCoatedSWOP.icc \
-profile /Users/fred/images/profiles/sRGB.icc \
-background white -flatten -quality 85 test.jpg
Re: Conversion with Blending Layer Issues (tif to jpg)
We are actually having some color issues with some of our conversions. PM'ed you.