comparison src/nsimage.m @ 101404:8bf66a156bc5

* nsimage.m (setPixmapData:): Set to ignore image DPI.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Fri, 23 Jan 2009 14:08:24 +0000
parents 954e1944ccf2
children b5a34573cf82
comparison
equal deleted inserted replaced
101403:9c7e692c226a 101404:8bf66a156bc5
398 bmRep = (NSBitmapImageRep *) rep; 398 bmRep = (NSBitmapImageRep *) rep;
399 onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)]; 399 onTiger = [bmRep respondsToSelector: @selector (colorAtX:y:)];
400 400
401 if ([bmRep numberOfPlanes] >= 3) 401 if ([bmRep numberOfPlanes] >= 3)
402 [bmRep getBitmapDataPlanes: pixmapData]; 402 [bmRep getBitmapDataPlanes: pixmapData];
403
404 /* The next two lines cause the DPI of the image to be ignored.
405 This seems to be the behavior users expect. */
406 [self setScalesWhenResized: YES];
407 [self setSize: NSMakeSize([bmRep pixelsWide], [bmRep pixelsHigh])];
408
403 break; 409 break;
404 } 410 }
405 } 411 }
406 } 412 }
407 413