[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving image to a file.

From: Adam Fedor
Subject: Re: Saving image to a file.
Date: Sun, 2 Nov 2003 20:40:42 -0700

On Sunday, November 2, 2003, at 01:21 PM, Tima Vaisburd wrote:

Dear list,

I'm unable to save the image I created in the program.

The image rep of that image is of type NSCachedImageRep,
and [image TIFFRepresentation] returns nil.

Adam Fedor wrote once that there is no workaround, and this is
a bug. Does anybody know about the fix?

There's a work-around now. Try something like this:

NSBitmapImageRep *brep;
[myImage lockFocus];
brep = [NSBitmapImageRep alloc] initWithFocusedViewRect: someRect];
[myImage unlockFocus];

data = [brep TIFFRepresentation];

I bet NSImage should do this for you, but currently it doesn't.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]