• 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: downloaded images and "Image Events"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: downloaded images and "Image Events"


  • Subject: Re: downloaded images and "Image Events"
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 6 Feb 2006 13:53:04 -0700

On Feb 6, 2006, at 1:38 PM, David A. Cox wrote:

But I get a type error every time I try to do something like scale the image, or even save it as a new file using Image Events. A failing example:

tell application "Image Events"
scale favicon by factor 2
end tell

Does anyone have any advice on how to make the downloaded image more useful?

For one thing, you have to open the image in Image Events.

Here is a sample:

set H_width to 640
set V_width to 480
set the photo to choose file
tell application "Image Events"
launch
set the selected_image to open the photo
set dims to dimensions of the selected_image
if item 1 of dims is greater than item 2 of dims then
if item 1 of dims is greater than H_width then
scale the selected_image to size H_width
else
scale the selected_image to size V_width
end if
save the selected_image in the photo
close the selected_image
end if
end tell

-- Michelle

-- 
"There's some good in the world, Mr. Frodo, and it's worth fighting for."

 _______________________________________________
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: 
 >download and convert favicons (From: "David A. Cox" <email@hidden>)
 >downloaded images and "Image Events" (From: "David A. Cox" <email@hidden>)

  • Prev by Date: Re: Various Qs about Intel and AppleScript
  • Next by Date: Re: Determining the Default Mail App
  • Previous by thread: downloaded images and "Image Events"
  • Next by thread: Re: downloaded images and "Image Events"
  • Index(es):
    • Date
    • Thread