Re: Scripting Bridge question
Re: Scripting Bridge question
- Subject: Re: Scripting Bridge question
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 15 Nov 2007 14:35:53 -0800
On 11/15/07, email@hidden <email@hidden> wrote:
> Thanks for the detailed explanation. Very enlightening. [[artwork
> data] description] tells me I got an NSImage, just as you:
>
> NSImage 0x1f5510 Size={944, 921} Reps=(
> NSPICTImageRep 0x109950 Size={944, 921}
> ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=944x921 Alpha=NO
> )
>
> Yet I can't use this as-is in an NSImageView for some reason. Maybe I
> need to pull the raw data out of the NSPictImageRep first, and create
> an NSImage out of that? But then, how do I do that? I searched the
> archives and it seems awfully complicated. Also, my main concern is
> speed. Would such a conversion be slower than using the NSAppleScript
> approach? Any way I can get the AEDesc's raw data directly from the
> iTunesArtwork property?
You already have an NSImage. Try writing that image out to a file (see
docs for NSImage to see how to do that) and see if you can open that
image using preview.
Also do you get a true or false back if you send that image an isValid message?
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden