• 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
cURL a .png file "as TIFF"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cURL a .png file "as TIFF"


  • Subject: cURL a .png file "as TIFF"
  • From: "David A. Cox" <email@hidden>
  • Date: Wed, 14 Feb 2007 15:51:31 -0800

I am looking to grab some images that are in .png file format right from the web into an applescript, and treat them "as TIFF" so I can use them as image icons in chat applications such as ichat. I can do this via "do shell script "curl URL"" for formats like .gif and even .ico, but .png files do not work. Is there some magic when dealing with .png files in this way? I would rather not have to write the file out to disk and deal with all those issues if I can help it.

A super simple example script is;

--set the path to the image
--These ones do not work
--set getImage to "curl http://www.google.com/images/nav_logo.png";
--set getImage to "curl http://video.google.com/images/left-arrow.png";

--These ones do
--set getImage to "curl http://www.google.com/images/x2.gif";
set getImage to "curl http://www.google.com/favicon.ico";


--get the image data as TIFF data set UserSetImageData to do shell script getImage as TIFF picture

--update ichat with the new image
tell application "iChat" to set image to UserSetImageData

Thanks,

DAC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: cURL a .png file "as TIFF"
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: newbie asks: Where do I begin?
  • Next by Date: Re: cURL a .png file "as TIFF"
  • Previous by thread: FM 8 layout references w/applescript - works in one file, fails in five other identical files!
  • Next by thread: Re: cURL a .png file "as TIFF"
  • Index(es):
    • Date
    • Thread