Trying to match output

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Trying to match output

Post by stevenb46 »

I'm trying to match output from photoshop. I'm told an image from IM is too orange (too bright). I can't seem to tone down the color without affecting other colors, example if I play with contrast to tone down the bright orange, it tones down the blues. Any ideas?

Code: Select all

convert -density 960 -units PixelsPerInch -colorspace sRGB "g54w08.eps" -flatten -quality 100 -scale 10% -weight Bolder -contrast "g54w08C.jpg"
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Trying to match output

Post by Bonzo »

I would suggest you upload an example input image as well as a correct result as " I'm told an image from IM is too orange (too bright). " does not give any useful information.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Trying to match output

Post by fmw42 »

The best way to match is to avoid the scaling (or blurring, etc) until the end so you have all the color operations first. Then create a PNG HALD:8 image in IM. Take the hald image to PS and process it with your same PS processing, except for any scaling or blurring or sharpening (things that are not point operations). Save it as PNG. Then bring it back to IM and apply the HALD image to your original image using -hald-clut. Then in IM do the same kinds of blurring and resizing to finish the processing. If you have to split the color and/or brightness operations and do the scaling or blurring. Then create two hald image. One for the first brightness color changes and the other for after you have resized or blurred the image and are doing the final brightness color changes.

see
http://www.imagemagick.org/Usage/color_mods/#hald-clut
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Trying to match output

Post by snibgo »

stevenb46 wrote:-colorspace sRGB "g54w08.eps"
Also see any recent discussion on profiles.
snibgo's IM pages: im.snibgo.com
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Re: Trying to match output

Post by stevenb46 »

fmw42 wrote:The best way to match is to avoid the scaling (or blurring, etc) until the end so you have all the color operations first. Then create a PNG HALD:8 image in IM. Take the hald image to PS and process it with your same PS processing, except for any scaling or blurring or sharpening (things that are not point operations). Save it as PNG. Then bring it back to IM and apply the HALD image to your original image using -hald-clut. Then in IM do the same kinds of blurring and resizing to finish the processing. If you have to split the color and/or brightness operations and do the scaling or blurring. Then create two hald image. One for the first brightness color changes and the other for after you have resized or blurred the image and are doing the final brightness color changes.

see
http://www.imagemagick.org/Usage/color_mods/#hald-clut
Fred, can you send me an example of the code required to do this?

Thanks much!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Trying to match output

Post by fmw42 »

Create the hald image in IM:

Code: Select all

convert   hald:8    hald_8.png
Take that over to PS and apply all point operations such as brightness contrast and color adjustments to the hald_8.png that you used to process your image in PS. Save the resulting image as hald_8_processed.png

Bring that image over to IM and apply it to the original image:

Code: Select all

convert image hald_8_processed.png -hald-clut result
You must not apply any non-point operations such as blur, sharpen, convolution, nor masking or resizing and must not save as JPG.

If any non-point operations need to be done, do those afterward or before or spit the processing with the hald image into two operations with two different hald images, one for before and the other for after the non-point operations.
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Re: Trying to match output

Post by stevenb46 »

Can I then convert to jpg and resize? Will -density affect this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Trying to match output

Post by fmw42 »

You can save your final result as jpg with no issue. It is not recommended to save hald images as jpg, nor any other intermediate images.
stevenb46
Posts: 40
Joined: 2014-08-20T08:47:18-07:00
Authentication code: 6789

Re: Trying to match output

Post by stevenb46 »

I had used:

convert myinput.eps hald:8 hald_8.png

It generated 2 files. hald_8-0.png and hald_8-1.png. What am I supposed to do with these files?

Sorry for my ignorance!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Trying to match output

Post by fmw42 »

convert myinput.eps hald:8 hald_8.png
To create a hald image, you just do

Code: Select all

convert hald:8 hald_8.png
see http://www.imagemagick.org/Usage/color_mods/#hald-clut

Then you take it to Photoshop and process it with the same "point operations" such as brightness contrast color changes such as saturation. No resize, no blur, no sharped, no masking. Save the file as PNG with a new name. Then bring it back to IM and do

Code: Select all

convert image new_hald_8_image.png -hald-clut processedimage
Post Reply