Re: CURL JPEG to PICT?
Re: CURL JPEG to PICT?
- Subject: Re: CURL JPEG to PICT?
- From: Andrew Oliver <email@hidden>
- Date: Sat, 18 Dec 2004 23:00:43 -0800
On 12/18/04 7:57 PM, "Bruce Robertson" <email@hidden> wrote:
> I can use a shell script and curl to grab an image, say a jpg image. Is
> there some way to then convert this into a PICT format?
>
[snip]
> For example see result of this:
>
> set myURL to
> "http://images.apple.com/home/2004/images/ipodphoto2right20041214.jpg"
> do shell script "curl " & myURL
> Set imagedata to result
>
> This is like reading the raw image file. How can I convert this into a
> format that I can use with Filemaker, like the following. It doesn¹t work
> but I hope you get the idea:
>
> Set data cell "Image" of record 1 to imagedata
If you don't mind saving the jpeg in an intermediary file you can use Image
Events to convert the file from JPEG to PICT:
set myURL to
"http://images.apple.com/home/2004/images/ipodphoto2right20041214.jpg"
tell application "URL Access Scripting" to download myURL to ((path to
desktop as text) & "image.jpg")
tell application "Image Events"
set theImage to open ((path to desktop as text) & "image.jpg")
save theImage in ((path to desktop as text) & "image.pict") as PICT
end tell
Andrew
_______________________________________________
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