• 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: Save image from raw data class variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save image from raw data class variable


  • Subject: Re: Save image from raw data class variable
  • From: jj <email@hidden>
  • Date: Thu, 17 Mar 2005 12:09:40 +0100

> 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:

#################
--> grab artwork
tell application "iTunes" to ¬
    set pictData to data of artwork 1 of track 1 of playlist 1

--> choose output file
set outputFile to (choose file name default name "artwork.pict")

--> create file from shell, so it borns without file/creator type
--> and it is mapped automatically to the default-app-for-pict-files
do shell script "touch " & quoted form of POSIX path of outputFile

--> write raw data
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
#################


jj

--
http://www.macscripter.net/
http://www.osaxen.com/


 _______________________________________________
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

  • Follow-Ups:
    • Re: Save image from raw data class variable
      • From: Kirill Kortchagin <email@hidden>
References: 
 >Save image from raw data class variable (From: Kirill Kortchagin <email@hidden>)

  • Prev by Date: Re: display dialog
  • Next by Date: Re: getting chunks of text
  • Previous by thread: Save image from raw data class variable
  • Next by thread: Re: Save image from raw data class variable
  • Index(es):
    • Date
    • Thread