• 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: iTunes Picture data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes Picture data


  • Subject: Re: iTunes Picture data
  • From: Roger Howard <email@hidden>
  • Date: Wed, 2 Jun 2004 12:02:24 -0700

On Jun 2, 2004, at 11:23 AM, John Mistler wrote:

Does anyone have an idea how iTunes removes .jpg data from an .mp3 file and
places it in an image view for viewing? I would like to do the same thing
in my AS application. I tried scripting iTunes to get the raw picture,
which seems to work, but making it viewable at that point--as raw data--is a
mystery. I am trying to avoid writing the .jpeg file separately to disk for
viewing, given that it already exists in the .mp3 file, and that would just
be wasting disk space. I know this has to do with Applescript Studio, but
it seems that the Applescript-Users list is full of iTunes scripters.

Yes, but if you've already gotten the data from iTunes, then your problem is with making AS Studio load an image into an image view from data in memory, so it's definitely an AS Studio question...

I can say you'll likely have to write a temp file to disk, and read that in - but that's not such a headache, and it's sure to work. This is the approach usually taken with many tools, including REALbasic. It comes down to whether the image import routines can take the data from memory or whether the API expects a file on disk.

According to the ASStudio docs:

http://developer.apple.com/documentation/AppleScript/Reference/ StudioReference/sr3_app_suite/chapter_3_section_23.html#//apple_ref/ doc/uid/20011217/ASKApplicationSuite.Commands.LoadImage

"load image" takes either a reference to an image already in your application, or a POSIX path to an image file. Perhaps you could load an image from memory using Cocoa calls, but that won't be any easier than dumping it to a /tmp file and loading that way.

-R
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >iTunes Picture data (From: John Mistler <email@hidden>)

  • Prev by Date: iTunes Picture data
  • Next by Date: Re: Need help in gui scripting
  • Previous by thread: iTunes Picture data
  • Next by thread: Re: Filling a cell in Excel
  • Index(es):
    • Date
    • Thread