mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
2005-01-18 16:39 Alexander Malmberg <alexander@malmberg.org>
* Source/NSBitmapImageRep.m (-TIFFRepresentationUsingCompression:factor:): Don't use pointer comparisons to compare strings. Handle both device and calibrated colorspaces. Warn if the colorspace isn't recognized. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20579 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d1daa284b4
commit
cc5de74696
2 changed files with 17 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-01-18 16:39 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSBitmapImageRep.m
|
||||
(-TIFFRepresentationUsingCompression:factor:): Don't use pointer
|
||||
comparisons to compare strings. Handle both device and calibrated
|
||||
colorspaces. Warn if the colorspace isn't recognized.
|
||||
|
||||
2005-01-18 15:50 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSApplication.m (-runModalSession:): Don't order the window
|
||||
|
|
|
@ -744,14 +744,20 @@ static BOOL supports_lzw_compression = NO;
|
|||
else
|
||||
info.planarConfig = PLANARCONFIG_CONTIG;
|
||||
|
||||
if (_colorSpace == NSDeviceRGBColorSpace)
|
||||
if ([_colorSpace isEqual: NSDeviceRGBColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedRGBColorSpace])
|
||||
info.photoInterp = PHOTOMETRIC_RGB;
|
||||
else if (_colorSpace == NSDeviceWhiteColorSpace)
|
||||
else if ([_colorSpace isEqual: NSDeviceWhiteColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedWhiteColorSpace])
|
||||
info.photoInterp = PHOTOMETRIC_MINISBLACK;
|
||||
else if (_colorSpace == NSDeviceBlackColorSpace)
|
||||
else if ([_colorSpace isEqual: NSDeviceBlackColorSpace]
|
||||
|| [_colorSpace isEqual: NSCalibratedBlackColorSpace])
|
||||
info.photoInterp = PHOTOMETRIC_MINISWHITE;
|
||||
else
|
||||
info.photoInterp = PHOTOMETRIC_RGB;
|
||||
{
|
||||
NSWarnMLog(@"Unknown colorspace %@.", _colorSpace);
|
||||
info.photoInterp = PHOTOMETRIC_RGB;
|
||||
}
|
||||
|
||||
info.extraSamples = (_hasAlpha) ? 1 : 0;
|
||||
info.compression = [self _localFromCompressionType: type];
|
||||
|
|
Loading…
Reference in a new issue