Re: Can NSImageView not antialias a bitmap image?
Re: Can NSImageView not antialias a bitmap image?
- Subject: Re: Can NSImageView not antialias a bitmap image?
- From: Glen Simmons <email@hidden>
- Date: Mon, 4 Oct 2004 12:32:34 -0500
On 4 Oct, 2004, at 11:49 AM, Nicko van Someren wrote:
On 4 Oct 2004, at 17:40, Nicko van Someren wrote:
On 4 Oct 2004, at 17:16, Glen Simmons wrote:
I'm creating an NSImage from some 1 bit bitmap data using
-[NSBitmapImageRep initWithBitmapDataPlanes:pixelsWide: ...] method.
I then call setScalesWhenResized:YES b/c the NSImageView it's going
to is larger than the original. I then set it in my NSImageView with
setImage:. Nothing special. The problem is that the image looks
fuzzy b/c the NSImageView is antialiasing it for me. How nice,
except that's not what I want. And there's not a way to tell
NSImageView not to antialias as far as I can see. What am I missing?
I'm not sure that there is a particular way to switch this off in
NSImageView but subclassing the image view with the following drawing
method works:
- (void)drawRect:(NSRect)rect { ... }
In fact, come to think of it, subclassing the setUpGState is less
typing and more efficient:
- (void)setUpGState {
[super setUpGState];
[[NSGraphicsContext currentContext] setImageInterpolation:
NSImageInterpolationNone];
}
Thanks for the suggestions. Unfortunately, I'm still seeing some
fuzziness. Might the problem be in the image creation / manipulation?
Glen
_______________________________________________
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