Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Bridge question



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Scripting Bridge question (From: has <email@hidden>)
 >Re: Scripting Bridge question (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.