cocoa: using Device colorspace, instead of Calibrated colorspace for GDI objects. #34427

git-svn-id: trunk@59362 -
This commit is contained in:
dmitry 2018-10-27 03:26:26 +00:00
parent 07161323f3
commit 62db4e537d
2 changed files with 5 additions and 5 deletions

View File

@ -1061,9 +1061,9 @@ end;
function TCocoaBitmap.GetColorSpace: NSString;
begin
if FType in [cbtMono, cbtGray] then
Result := NSCalibratedWhiteColorSpace
Result := NSDeviceWhiteColorSpace
else
Result := NSCalibratedRGBColorSpace;
Result := NSDeviceRGBColorSpace;
end;
// Cocoa cannot create a context unless the image has alpha pre-multiplied
@ -2990,7 +2990,7 @@ begin
FColor := AColor;
FColor.retain;
RGBColor := AColor.colorUsingColorSpaceName(NSCalibratedRGBColorSpace);
RGBColor := AColor.colorUsingColorSpaceName(NSDeviceRGBColorSpace);
if Assigned(RGBColor) then
SetColor(NSColorToRGB(RGBColor), True)
@ -3054,7 +3054,7 @@ begin
FCGPattern := nil;
FBitmap := nil;
FImage := nil;
RGBColor := AColor.colorUsingColorSpaceName(NSCalibratedRGBColorSpace);
RGBColor := AColor.colorUsingColorSpaceName(NSDeviceRGBColorSpace);
if Assigned(RGBColor) then
inherited Create(NSColorToRGB(RGBColor), True, AGlobal)
else

View File

@ -499,7 +499,7 @@ begin
for y := 0 to ImageRep.pixelsHigh - 1 do
for x := 0 to ImageRep.pixelsWide - 1 do
begin
RGBColor := NSBitmapImageRep(ImageRep).colorAtX_y(x, y).colorUsingColorSpaceName(NSCalibratedRGBColorSpace);
RGBColor := NSBitmapImageRep(ImageRep).colorAtX_y(x, y).colorUsingColorSpaceName(NSDeviceRGBColorSpace);
if Assigned(RGBColor) then
begin
if (x = 0) and (y = 0) then