mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Made the code a bit more tolerant on matching colour spaces during
image conversion. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27280 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ec503ee59d
commit
97d5040a02
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-12-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBitmapImageRep.m (-_convertToFormatBitsPerSample:...):
|
||||
Made the code a bit more tolerant on matching colour spaces during
|
||||
image conversion.
|
||||
|
||||
2008-12-10 02:31-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSNibLoading.m: Change code which adds subviews to use
|
||||
|
|
|
@ -2147,7 +2147,11 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
bytesPerRow: rowBytes
|
||||
bitsPerPixel: pixelBits];
|
||||
|
||||
if ([_colorSpace isEqualToString: colorSpaceName])
|
||||
if ([_colorSpace isEqualToString: colorSpaceName] ||
|
||||
([_colorSpace isEqualToString: NSDeviceRGBColorSpace] &&
|
||||
[colorSpaceName isEqualToString: NSCalibratedRGBColorSpace]) ||
|
||||
([colorSpaceName isEqualToString: NSDeviceRGBColorSpace] &&
|
||||
[_colorSpace isEqualToString: NSCalibratedRGBColorSpace]))
|
||||
{
|
||||
SEL getPSel = @selector(getPixel:atX:y:);
|
||||
SEL setPSel = @selector(setPixel:atX:y:);
|
||||
|
@ -2158,7 +2162,8 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
float _scale;
|
||||
float scale;
|
||||
|
||||
NSDebugLLog(@"NSImage", @"Converting %@ bitmap data", colorSpaceName);
|
||||
NSDebugLLog(@"NSImage", @"Converting %@ bitmap data", _colorSpace);
|
||||
|
||||
if (_bitsPerSample != bps)
|
||||
{
|
||||
_scale = (float)((1 << _bitsPerSample) - 1);
|
||||
|
@ -2414,7 +2419,8 @@ _set_bit_value(unsigned char *base, long msb_off, int bit_width,
|
|||
IMP setC = [new methodForSelector: setCSel];
|
||||
int i, j;
|
||||
|
||||
NSDebugLLog(@"NSImage", @"Slow converting %@ bitmap data", colorSpaceName);
|
||||
NSDebugLLog(@"NSImage", @"Slow converting %@ bitmap data to %@",
|
||||
_colorSpace, colorSpaceName);
|
||||
for (j = 0; j < _pixelsHigh; j++)
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(pool);
|
||||
|
|
Loading…
Reference in a new issue