Skip navigation.
 
mlRe: Can NSImageView not antialias a bitmap image?
FROM : Nicko van Someren
DATE : Mon Oct 04 20:07:18 2004

On 4 Oct 2004, at 18:32, Glen Simmons wrote:
> On 4 Oct, 2004, at 11:49 AM, Nicko van Someren wrote:

...
>> - (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?


I think it might well be to do with the creation of the image.  I just
tried the above code on an NSImageView subclass having used IB to set
it as scale to fit and editable so I can drop image on it.  If I drop a
tiny GIF in it comes out crisp and pixelated whereas if I comment out
the image interpolation setting line it comes out smoothed.

It's possible that a cached representation is getting created before it
reaches the point that the NSImageView gets to draw it, possibly when
you set the image size.  You might try not setting the image size but
instead setting the NSImageView to scale to fit and see what happens
then.

   Nicko

Related mailsAuthorDate
mlCan NSImageView not antialias a bitmap image? Glen Simmons Oct 4, 18:16
mlRe: Can NSImageView not antialias a bitmap image? Nicko van Someren Oct 4, 18:40
mlRe: Can NSImageView not antialias a bitmap image? Nicko van Someren Oct 4, 18:49
mlRe: Can NSImageView not antialias a bitmap image? Glen Simmons Oct 4, 19:32
mlRe: Can NSImageView not antialias a bitmap image? Nicko van Someren Oct 4, 20:07