RE: Getting values in Photoshop 7 - the complete request
RE: Getting values in Photoshop 7 - the complete request
- Subject: RE: Getting values in Photoshop 7 - the complete request
- From: "CS Carl Stawicki (4211)" <email@hidden>
- Date: Wed, 21 May 2003 09:45:53 -0400
>
"You get 256 values returned (from both RGB and CMYK images), but I
>
haven't
>
got a clue what they represent - you don't happen to know do you?"
>
The 256 values represent the 256 possible tones in one channel. Each item in
a histogram list is the total number of pixels of that tone, and the
position of each item is the tonal value it represents, EXCEPT, you need to
remember to subtract 1, because a scale of tonal values actually starts with
zero (0-255). You can relate this to the actual histogram viewed in
Photoshop. The 0's would represent the gaps in a histogram, or, tonal values
that don't exist. Higher numbers in a histogram list would be taller spikes
(more pixels) in a Photoshop histogram, and lower the shorter spikes (less
pixels). If you had one pixel selected, you would get a list of 255 '0's'
and one '1'.
To get RGB values of one pixel, you need a list from each channel. Determine
the position of the '1' in each list, subtract 1, and that's your RGB value
for that pixel (24, 107, 250, for instance).
Getting CMYK values would be a major pain. You can do the same thing as for
RGB, but you need to translate the 256 scale into ink percentages. Sounds
easy to do with simple division ( x / 2.56), but the percentage of ink is
relative to the CMYK profile that is assigned to the image. For instance,
one would think that a tonal value of 128 would be equal to 50% ink, but
that's not the case. I would have no clue how to deal with this with AS.
Carl.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.