Correct test for the need of an image conversion.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@27279 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-12-11 21:03:51 +00:00
parent 8d8d64823a
commit 70ede5cb90
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2008-12-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/cairo/CairoContext.m (-GSDrawImage::): Correct test
whether image conversion is needed.
2008-12-10 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/x11/XGServerEvent.m (-runLoopShouldBlock:): Add method to

View file

@ -140,7 +140,7 @@
bitmap = (NSBitmapImageRep*)imageref;
colorSpaceName = [bitmap colorSpaceName];
if ([bitmap isPlanar] || ([bitmap bitmapFormat] != 0)
|| ([bitmap bitsPerPixel] != 8) ||
|| ([bitmap bitsPerSample] != 8) ||
(![colorSpaceName isEqualToString: NSDeviceRGBColorSpace] &&
![colorSpaceName isEqualToString: NSCalibratedRGBColorSpace]))
{
@ -150,7 +150,7 @@
NSString *colorSpaceName = NSCalibratedRGBColorSpace;
NSBitmapImageRep *new;
new = [bitmap _convertToFormatBitsPerSample: bitsPerSample
new = [bitmap _convertToFormatBitsPerSample: bitsPerSample
samplesPerPixel: samplesPerPixel
hasAlpha: [bitmap hasAlpha]
isPlanar: isPlanar