Re: Write image data to file
Re: Write image data to file
- Subject: Re: Write image data to file
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 09 Mar 2010 10:09:40 -0800
- Thread-topic: Write image data to file
>doug> Try changing "data" to "raw data".
That works for me:
tell application "iTunes"
set playingTrack to current track
set trackArtwork to artwork 1 of playingTrack
set imageData to raw data of trackArtwork
set blankFile to (path to desktop as string) & "picture.pict"
set fileReference to (open for access blankFile with write permission)
set eof of blankFile to 0
write imageData starting at 0 to fileReference
close access fileReference
end tell
tell application "Preview"
open blankFile
activate
end tell
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden