What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

Don, the problem I have with the value reported by code like this ...


<?php

$im imagecreatefrompng('nexen.png');

$start_x 40;

$start_y 50;

$color_index imagecolorat($im$start_x$start_y);

$color_tran imagecolorsforindex($im$color_index);

print_r($color_tran);


... Is that I don't know exactly what it factors in unless I spend considerable time looking up the details of the function calls. 


For example, does the value that it returns include the effects of the color profile for the image.  I suspect that it doesn't because I don't see any mention of including that as another parameter in any of the function calls or as a global, or as a call to another function.  If it doesn't include this, all bets are off because all you are getting are the "uninterpreted" raw values.  Of course, color-managed applications like PS will include this and translate the raw values into device-independent values for processing, for passing on to the display profile for conversion to display values, etc.


However, I can tell you this:  Prompted by your question, I just did a little test, I took a sRGB JPG image with a very uniform blue sky and read the RGB values for the sky in three color managed photo viewers.  The RGB values from all were absolutely identical, so I really don't think there is any problem with PS. 


Instead of relying on just the PHP results, check it with other properly color-managed software.


Tom


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top