Re: cURL a .png file "as TIFF"
Re: cURL a .png file "as TIFF"
- Subject: Re: cURL a .png file "as TIFF"
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 14 Feb 2007 19:22:31 -0500
sounds like "as TIFF" doesn't understand the PNG format. Just convert
it with ImageMagick or something first
(e.g. do shell script "curl -O http://some.host/some/image.png;
convert image.png image.tiff; cat image.tiff"; set tiffImage to result
as TIFF
On 2/14/07, David A. Cox <email@hidden> wrote:
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
--
Mark J. Reed <email@hidden>
_______________________________________________
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