• 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
Convert PICT to NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Convert PICT to NSImage


  • Subject: Convert PICT to NSImage
  • From: Ian was here <email@hidden>
  • Date: Mon, 27 Jun 2005 09:34:36 -0700 (PDT)

I'm trying to convert a PICT into an NSImage and am
having no luck at it. The following code fails. Has
anyone been successful at this? Thanks.



HLock( (Handle)Pict );

NSPICTImageRep	*pictImage = [NSPICTImageRep
imageRepWithData:[NSData dataWithBytes:Pict
length:GetHandleSize( (Handle)Pict )]];

if ( pictImage == nil )
{
 NSLog(@"failed");
}

HUnlock( (Handle)Pict );


[newImage lockFocus];
[pictImage drawAtPoint:NSZeroPoint];
[newImage unlockFocus];




____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Convert PICT to NSImage
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Convert PICT to NSImage
      • From: Alexander Dymerets <email@hidden>
    • Re: Convert PICT to NSImage
      • From: String Larson <email@hidden>
  • Prev by Date: Re: Is Cocoa incompatible with 64-bit?
  • Next by Date: Re: pageHeader and pageFooter
  • Previous by thread: Re: How do I create a NSArray of NSString constants?
  • Next by thread: Re: Convert PICT to NSImage
  • Index(es):
    • Date
    • Thread