Re: how to save a image in NSImage to pict format file
Re: how to save a image in NSImage to pict format file
- Subject: Re: how to save a image in NSImage to pict format file
- From: Stefan Jung <email@hidden>
- Date: Tue, 23 Oct 2001 19:27:05 +0200
Am Dienstag den, 23. Oktober 2001, um 16:56, schrieb John C. Randolph:
On Monday, October 22, 2001, at 07:51 AM, sunnyvale wrote:
I can save the NSImage to GIF or JPEG but not PICT.
As far as I investigate, OS X doesn't seem to support PICT format.
Does anybody knows the way to convert image format to PICT?
It seems that Cocoa can only read PICTs, not write them.
I investigated this problem about three month ago and indeed there is no
cocoa solution. The situation did not change with the release of MacOS
10.1. I was yet too lazy to try using Quickdraw for creating PICT data
in any way. It should be possible to create an offscreen Quickdraw view,
but what data do you use to render? If you draw the image on your on,
you could write Quickdraw version of drawRect:. In this case you have
to convert all you floating point coordinates into integers and in any
case the PICT will look different than any other representation. For
example there is no antialiasing in Quickdraw. If your image is read
from disk the only way I see is getting the bitmap and converting it
pixel by pixel. There are also things like color tables and header data
and so on.
You see why I wasn't too eager to do so.
Stefan