Match Photoshop PNG export
Match Photoshop PNG export
When converting an eps to png via Photoshop the equivalent in ImageMagick has resulted in what appears to be highly saturated colours.
Here is the photoshop png
Here is the imagemagick png
What parameters would I need to tweak to match or come close to the photoshop version?
The only thing done in Photoshop is open the eps in RGB mode at 300dpi, resize the canvas and save as png with no interlace and small file size.
Currently using Version: ImageMagick 7.0.5-6 Q16 x64 2017-05-13
Here is the photoshop png
Here is the imagemagick png
What parameters would I need to tweak to match or come close to the photoshop version?
The only thing done in Photoshop is open the eps in RGB mode at 300dpi, resize the canvas and save as png with no interlace and small file size.
Currently using Version: ImageMagick 7.0.5-6 Q16 x64 2017-05-13
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Match Photoshop PNG export
Please post your EPS file and what version Ghostscript you are using? And your exact command line!
Note that PS will likely output Adobe RGB whereas ImageMagick will output sRGB unless there is a profile with your EPS file. Best to convert using profiles.
Code: Select all
gs --version
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Match Photoshop PNG export
This may be a CMYK profile problem. PNG can't store CMYK, so if the Ghostscript output is CMYK then IM will do a "-colorspace" conversion. I suspect you need a "-profile" conversion (as Fred says).
I also see the IM version contains spot colours. I assume these have been simply copied from the EPS. But IM doesn't process spot colours.
I also see the IM version contains spot colours. I assume these have been simply copied from the EPS. But IM doesn't process spot colours.
snibgo's IM pages: im.snibgo.com
Re: Match Photoshop PNG export
I am using Ghostscript 9.21 64bit
Command I use is
magick convert -density 300 -antialias -gravity center -extent 827x461 -interlace none test.eps -quality 100 -auto-level png24:test.png
Command I use is
magick convert -density 300 -antialias -gravity center -extent 827x461 -interlace none test.eps -quality 100 -auto-level png24:test.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Match Photoshop PNG export
Running the following in IM 6.9.8.6 Q16 Mac OSX, I get something similar to your ImageMagick result and not the PS result. I think the issue is the spot colors that Photoshop can use and ImageMagick cannot.
Code: Select all
convert -density 300 -profile /Users/fred/images/profiles/AdobeRGB1998.icc test.eps -shave 10x10 -trim +repage test.png
Re: Match Photoshop PNG export
I have tried this approach with a slight improvement in the result.
magick convert test.png -profile "sRGB IEC61966-21.icc" -profile "C:\Program Files (x86)\Common Files\Adobe\Color\Profiles\Photoshop5DefaultCMYK.icc" test.png
Though I'm not quiet sure why I have to add multiple profiles to get this to change.
magick convert test.png -profile "sRGB IEC61966-21.icc" -profile "C:\Program Files (x86)\Common Files\Adobe\Color\Profiles\Photoshop5DefaultCMYK.icc" test.png
Though I'm not quiet sure why I have to add multiple profiles to get this to change.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Match Photoshop PNG export
You need to add multiple profiles since the input EPS file was CMYK without a profile. It was my mistake to have missed that when examining your file. But you have the two profiles reversed. You need to specify the CMYK profile first, then the sRGB profile is last since you must convert to sRGB, since PNG does not support CMYK. I usually use USWebCoatedSWOP.icc for the CMYK profile.
This seems to be a bit better than I had before.
You can try different CMYK and RGB profiles (such as sRGB).
This seems to be a bit better than I had before.
Code: Select all
convert -density 300 -profile /Users/fred/images/profiles/USWebCoatedSWOP.icc -profile /Users/fred/images/profiles/AdobeRGB1998.icc test.eps -shave 10x10 -trim +repage test.png
Re: Match Photoshop PNG export
When I swap the profiles around as you suggested it reverts back to the original look as if no profiles were added.
I tried your example too and still the same. I'm stumped.
I tried your example too and still the same. I'm stumped.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Match Photoshop PNG export
Don't use "magick convert". Use only "magick". Does that help?
This is what I get. It looks sort of close to your PS result. I am using IM 6.9.8.6 Q16 Mac OSX with GS 9.21
and from IM 7.0.5.7 Q16 Mac OSX
This is what I get. It looks sort of close to your PS result. I am using IM 6.9.8.6 Q16 Mac OSX with GS 9.21
Code: Select all
convert -density 300 test.eps -profile /Users/fred/images/profiles/USWebCoatedSWOP.icc -profile /Users/fred/images/profiles/sRGB.icc -shave 10x10 -trim +repage test_result1.png
and from IM 7.0.5.7 Q16 Mac OSX
Code: Select all
magick -density 300 test.eps -profile /Users/fred/images/profiles/USWebCoatedSWOP.icc -profile /Users/fred/images/profiles/sRGB.icc -shave 10x10 -trim +repage test_result3.png