mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 20:36:09 +02:00
cocoa: fix RGB description
git-svn-id: trunk@38858 -
This commit is contained in:
parent
d8d59de96c
commit
4466415dbd
@ -481,6 +481,7 @@ function TCocoaWidgetSet.RawImage_DescriptionFromCocoaBitmap(out ADesc: TRawImag
|
||||
var
|
||||
Prec, Shift: Byte;
|
||||
BPR: Integer;
|
||||
HasAlpha: Boolean;
|
||||
begin
|
||||
ADesc.Init;
|
||||
|
||||
@ -530,9 +531,11 @@ begin
|
||||
if ABitmap.BitmapType in [cbtARGB, cbtRGBA] then
|
||||
ADesc.AlphaPrec := Prec;
|
||||
|
||||
HasAlpha := ABitmap.ImageRep.hasAlpha;
|
||||
|
||||
case ABitmap.BitmapType of
|
||||
cbtRGB: begin
|
||||
Shift := 32 - Prec;
|
||||
Shift := 24 - Prec;
|
||||
ADesc.RedShift := Shift;
|
||||
Dec(Shift, Prec);
|
||||
ADesc.GreenShift := Shift;
|
||||
|
Loading…
Reference in New Issue
Block a user