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: Shane Stanley <email@hidden>
- Date: Wed, 21 May 2003 08:40:40 +1000
On 21/5/03 7:24 AM +1000, Martin Orpen, email@hidden, wrote:
>
I looked into this yesterday and discovered that you have to use a
>
workaround as there are no direct methods to get the colours of a pixel in
>
Photoshop.
>
>
You have to make a selection, call up the histogram and grab the values from
>
that.
>
>
You'll find a useful script from Shane Stanley on the Adobe Forums if you
>
search for a posting titled "Scripting the color-picker ?"
To save the hunt, here's the RGB version; CMYK will involve the same thing
but four channels:
tell application "Adobe Photoshop 7.0"
activate
tell current document
select region {{2, 3}, {2, 4}, {3, 4}, {3, 3}} without antialiasing
set {r, g, b} to histogram of channels 1 thru 3
repeat with i from 1 to 256
if item i of r = 1 then
set thered to (i - 1)
end if
if item i of g = 1 then
set thegreen to (i - 1)
end if
if item i of b = 1 then
set theblue to (i - 1)
end if
end repeat
{thered, thegreen, theblue}
end tell
end tell
>
I was hoping to create a script that could parse an image and give me the
>
CMYK values of the darkest pixels so that I could see if it was greater than
>
the max ink weight of a specific press.
>
>
Products like MarkzScout will do this with TIFF files - but not much else.
>
>
I don't really think that selecting each pixel of a 70Mb image, calling the
>
histogram and storing the values is a workable solution :-(
You could try using threshold adjustment to (hopefully) eliminate most of
the image, but I still doubt that it would be very practical.
--
Shane Stanley, email@hidden
_______________________________________________
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.