Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

[OSX, C] how to create a PICT file?

I'm looking at the Quartz / Core Graphics libraries and I need to create a PICT. I have a CGImageRef of the image. I can create a TIFF, for example by creating a CGImageDestinationRef of type kUTTypeTIFF and passing it a dictionary with kCGImagePropertyTIFFDictionary.

I would think that the same would be true for PICT, but although there is a kUTTypePICT constant, there is no kCGImagePropertyPICTDictionary. Is there some other way I need to create picts? like there is another way I need to create PDF files?

thanks

Mac Mini, Mac OS X (10.5.3)

Posted on Jan 21, 2009 1:43 PM

Reply
Question marked as Best reply

Posted on Jan 21, 2009 6:35 PM

A PICT is a sequence of QuickDraw drawing commands. Quartz is a fundamental replacement for QuickDraw. What you ask for is not and never will be supported.

Probably your best bet is to use QuickTime's GraphicExporter routines in ImageCompression.h, you should be able to shimmy around a Quartz bitmap to be usable as a QuickTime GWorld source without undue difficulty.

If you can't link to QuickTime for some reason, then you're down to creating one yourself. Here you go, good luck with that.

http://developer.apple.com/technotes/qd/qd_14.html

If you're just trying to put bitmapped data in, then you only need to sort out how to get one BitsRect opcode set up properly.
6 replies
Question marked as Best reply

Jan 21, 2009 6:35 PM in response to Brian Postow

A PICT is a sequence of QuickDraw drawing commands. Quartz is a fundamental replacement for QuickDraw. What you ask for is not and never will be supported.

Probably your best bet is to use QuickTime's GraphicExporter routines in ImageCompression.h, you should be able to shimmy around a Quartz bitmap to be usable as a QuickTime GWorld source without undue difficulty.

If you can't link to QuickTime for some reason, then you're down to creating one yourself. Here you go, good luck with that.

http://developer.apple.com/technotes/qd/qd_14.html

If you're just trying to put bitmapped data in, then you only need to sort out how to get one BitsRect opcode set up properly.

Jan 22, 2009 7:39 AM in response to Brian Postow

Heh, you've put your finger on the problem nicely 🙂

Last time this issue came up on the lists, cocoa-dev I think it was, people tried to convince the person with the problem that PICT was obsolete so get over it, and it turned out that the sticking point was indeed that Word (I think it was Word, definitely some major Microsoft product) did not recognize any clipboard format except PICT.

I assumed you'd already got that far so I went straight to the generally agreed solution, which was to render your graphics to a Quartz bitmap then use QuickTime to wrap it in a GWorld and make a PICT from that.

[OSX, C] how to create a PICT file?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.