Re: Save image from raw data class variable
Re: Save image from raw data class variable
- Subject: Re: Save image from raw data class variable
- From: Kirill Kortchagin <email@hidden>
- Date: Thu, 17 Mar 2005 15:13:03 +0300
On мар 17, 2005, at 14:09, jj wrote:
I getting a track artwork from iTunes as <<data
PICT36D40...bla-bla-bla...>> and I need to save it in file.
How I can do that? Does exists any solutions with a shell commands or
an additions?
Aha-pupok
email@hidden
http://www.yezhe.ru/applescript/
You can simply write the data to a PICT file. Eg:
#################
tell application "iTunes" to ¬
set pictData to data of artwork 1 of track 1 of playlist 1
set outputFile to (choose file name default name "artwork.pict")
do shell script "touch " & quoted form of POSIX path of outputFile
set fref to (open for access outputFile with write permission)
set eof of fref to 0 --> empty file if needed
write pictData to fref
close access fref
#################
Thanks! It work!
Before it I saw the JPEG signature or the PNG signature in the text of
written files and I tried to save and to open it as the JPEG or PNG
file respectively. ;)
Aha-pupok
email@hidden
http://www.yezhe.ru/applescript/
_______________________________________________
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