• 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
Re: Can NSImageView not antialias a bitmap image?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Can NSImageView not antialias a bitmap image?
      • From: Nicko van Someren <email@hidden>
References: 
 >Can NSImageView not antialias a bitmap image? (From: Glen Simmons <email@hidden>)
 >Re: Can NSImageView not antialias a bitmap image? (From: Nicko van Someren <email@hidden>)
 >Re: Can NSImageView not antialias a bitmap image? (From: Nicko van Someren <email@hidden>)

  • Prev by Date: NSPrintInfo change notification?
  • Next by Date: Re: Changing the background of a 1 bit bitmap?
  • Previous by thread: Re: Can NSImageView not antialias a bitmap image?
  • Next by thread: Re: Can NSImageView not antialias a bitmap image?
  • Index(es):
    • Date
    • Thread