Variation in color values from input to 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
RedFlyer
Posts: 8
Joined: 2014-01-30T16:57:55-07:00
Authentication code: 6789

Variation in color values from input to output

Post by RedFlyer »

Using the command: convert -size 850x850 canvas:'rgb(255,0,0)' testBox.jpg

I was able to create a lovely red box, but when I take it into photoshop and check the value of the red it reads as 254,0,0. When I try it with green I get 0,255,1 and with blue it's 0,0,254.

I also tried adding a profile to see if that would help: convert -size 850x850 -profile /AdobeRGB1998.icc canvas:'rgb(0,0,255)' testBox.jpg
But it produced the same results. Did the same with sRGB, with more of the same.

Anyone have any thoughts on what's causing the variance from the input to output, and know what I could do to fix it?

Thank you so much for any replies, and hope you have a great day!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Variation in color values from input to output

Post by snibgo »

Jpeg is lossy compression, which means it changes color values.

If you want to keep the specified values, don't use lossy compression.
snibgo's IM pages: im.snibgo.com
RedFlyer
Posts: 8
Joined: 2014-01-30T16:57:55-07:00
Authentication code: 6789

Re: Variation in color values from input to output

Post by RedFlyer »

Gotcha, thanks!
Post Reply