What I'm trying to accomplish: I want to use ImageMagick to add a layer on top of an image, with a color blend (an image, not 1 fixed color). ImageMagick only has colorburn but not color, so I created the color blend layer in photoshop and saved it. Then, with ImageMagick, I combine the jpg I want to use with the psd, using the following command:
convert 1.jpg 1.jpg color.psd[2] -background white -alpha set test.psd
The file opens/displays perfectly in Photoshop. However, if I want to convert it to JPG via ImageMagick, it messes up.
convert test.psd[0] test.jpg - output:
convert -flatten test.psd test.jpg - output:
If I open the psd created by ImageMagick in Photoshop, and save it, and try converting again with "convert test.psd[0] test.jpg" I get the correct output.
I don't want to have to open the file in photoshop however.
What could I be missing?
I assume I don't have to add 1.jpg twice in the psd creation command, but otherwise it messes up a little.
Thanks in advance for any pointers!
Issues converting a PSD generated by IM to JPG
-
- Posts: 4
- Joined: 2012-07-24T05:14:15-07:00
- Authentication code: 15
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Issues converting a PSD generated by IM to JPG
This is not proper IM syntax to convert your psd to jpg. There is - output:convert test.psd[0] test.jpg - output:
Just do
convert test.psd[0] test.jpg
see
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/basics/#cmdline
-
- Posts: 4
- Joined: 2012-07-24T05:14:15-07:00
- Authentication code: 15
Re: Issues converting a PSD generated by IM to JPG
Sorry, what I meant with "- output:" wasn't part of the command, but what the actual output image was of that command
Re: Issues converting a PSD generated by IM to JPG
Have you already tried
convert test.psd[0] -background white -alpha remove test.jpg
convert test.psd[0] -background white -alpha remove test.jpg
-
- Posts: 4
- Joined: 2012-07-24T05:14:15-07:00
- Authentication code: 15
Re: Issues converting a PSD generated by IM to JPG
Hey indiego!
Thanks for your response. Just tried your command, but unfortunately I get the same output.
See here: http://samgranger.com/remove.jpg
Ps. I'm running on ImageMagick 6.7.7-7
Thanks for your response. Just tried your command, but unfortunately I get the same output.
See here: http://samgranger.com/remove.jpg
Ps. I'm running on ImageMagick 6.7.7-7
Re: Issues converting a PSD generated by IM to JPG
I see. What happens if you directly convert to JPG or use PNG as intermediate format?
Maybe the problem is related to PSD (no experience with it).
convert 1.jpg 1.jpg color.psd[2] -background white -alpha remove test.jpg
convert 1.jpg 1.jpg color.psd[2] -background white -alpha set test.png
convert test.png -background white -alpha remove test.jpg
Also: isn't this what you want?
http://www.imagemagick.org/Usage/compose/#colorize
Maybe the problem is related to PSD (no experience with it).
convert 1.jpg 1.jpg color.psd[2] -background white -alpha remove test.jpg
convert 1.jpg 1.jpg color.psd[2] -background white -alpha set test.png
convert test.png -background white -alpha remove test.jpg
Also: isn't this what you want?
http://www.imagemagick.org/Usage/compose/#colorize
-
- Posts: 4
- Joined: 2012-07-24T05:14:15-07:00
- Authentication code: 15
Re: Issues converting a PSD generated by IM to JPG
Same problem unfortunately. Colorize is not an option, since colorize only works with one solid color if I'm not mistaken. The layer I need to be "colorizing" is a "complex" image.
Re: Issues converting a PSD generated by IM to JPG
Bad luck then. As I understand it 'colorize' uses the hue and saturation information of color.psd and adds it to the luminace information of the other graphic. So this should do the job...
convert color.jpg 1.jpg -compose Colorize -composite test.jpg
Maybe some of the gurus here can confirm that (haven't tested myself).
convert color.jpg 1.jpg -compose Colorize -composite test.jpg
Maybe some of the gurus here can confirm that (haven't tested myself).