Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Anti-Aliased NSImageView

Anti-Aliased NSImageView
Thread Tools
Senior User
Join Date: Jun 1999
Location: San Jose, CA
Status: Offline
Reply With Quote
Oct 4, 2002, 09:52 PM
 
How does Preview do it? If you open an image in preview, you have the option to turn on anti-aliasing. I would love to do this in my app (an image in my app looks horrid compared to opening it in preview).

And before you ask, I am not writing a competitor to Preview, I just want my users have the option of viewing the received pdf files inside my program rather than having to go to another program.
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Oct 5, 2002, 01:07 AM
 
I think NSImageView provides the highest level of smoothing for resized images by default, but in case I'm wrong (or if you'd like to have a lower level of smoothing)...

Subclass NSImageView and override -drawRect:. Call [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh] (or Medium or Low or Default) and then call super. That's it.
Rick Roe
icons.cx | weblog
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:53 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2