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

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
References: 
 >cURL a .png file "as TIFF" (From: "David A. Cox" <email@hidden>)

  • Prev by Date: cURL a .png file "as TIFF"
  • Next by Date: How does AppleScript ID the application in a Tell block
  • Previous by thread: cURL a .png file "as TIFF"
  • Next by thread: How does AppleScript ID the application in a Tell block
  • Index(es):
    • Date
    • Thread