Open Menu
Close Menu
Apple
Shopping Bag
Apple
Mac
iPad
iPhone
Watch
TV
Music
Support
Search apple.com
Shopping Bag
Lists
Open Menu
Close Menu
Terms and Conditions
Lists hosted on this site
Email the Postmaster
Tips for posting to public mailing lists
Re: Searching for RGB images in a Quark doc
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Re: Searching for RGB images in a Quark doc
Subject
:
Re: Searching for RGB images in a Quark doc
From: Mark Butler <
email@hidden
>
Date: Fri, 23 Jun 2006 07:42:15 -0700
Somebody posted this.... wish I could give them the credit they deserve... But it might help you out. I have some incarnation of this running on our art folders so that rgb images cant get put in this folder...
Mark
on adding folder items to this_folder after receiving these_items
repeat with i from 1 to number of items in these_items
set this_item to item i of these_items
tell application "Finder"
set theFileName to the name of this_item
end tell
tell application "Image Events"
launch
set this_image to open this_item
set theCSpace to the color space of this_image
copy the resolution of this_image to {xres, yres}
close this_image
end tell
set theCSpaceString to theCSpace as string
if theCSpaceString does not contain "CMYK" and xres is less than 250 then
my alertNumpty(theFileName, "both")
end if
if theCSpaceString does not contain "CMYK" and xres is greater than 250 then
my alertNumpty(theFileName, "rgb")
end if
if xres is less than 250 and theCSpaceString contains "CMYK" then
my alertNumpty(theFileName, "res")
end if
set this_item to ""
set this_image to ""
set theCSpace to ""
end repeat
end adding folder items to
on alertNumpty(theFileName, theReason)
if theReason is equal to "rgb" then
tell application "Finder"
--activate
beep
display dialog "The image " & theFileName & " has been saved as
RGB, no RGB images should be saved in this folder."
end tell
else if theReason is equal to "res" then
tell application "Finder"
--activate
beep
display dialog "The resolution of the image, " & theFileName & "
is less than 250 pixels/inch. Images should be saved at 300 pixels/ inch."
end tell
else if theReason is equal to "both" then
tell application "Finder"
--activate
beep
display dialog "The image " & theFileName & " has been saved as
RGB and it the resolution is less than 250 pixels/inch. Sort it out!!"
end tell
end if
end alertNumpty
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References:
>
Re: Searching for RGB images in a Quark doc
(From: email@hidden)
>
Re: Searching for RGB images in a Quark doc
(From: Peter Waibel <email@hidden>)
Prev by Date:
Re: Is it possible to make an AppleScript application a URL handler?
Next by Date:
Re: Is it possible to make an AppleScript application a URL handler?
Previous by thread:
Re: Searching for RGB images in a Quark doc
Next by thread:
Is it possible to make an AppleScript application a URL handler?
Index(es):
Date
Thread