mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:59:22 +02:00
carbon: fix for mask/gray color images creation
git-svn-id: trunk@25956 -
This commit is contained in:
parent
0f2d6c94a9
commit
77d51a79d2
@ -1928,6 +1928,10 @@ begin
|
||||
FType := AType;
|
||||
FAlignment := AAlignment;
|
||||
|
||||
//todo: FDepth should not be Zero. Need to find out what's causing it.
|
||||
if (FType in [cbtMono, cbtGray]) and (FDepth=0) then
|
||||
FDepth:=FBitsPerPixel;
|
||||
|
||||
FBytesPerRow := ((AWidth * ABitsPerPixel) + 7) shr 3;
|
||||
M := FBytesPerRow and ALIGNBITS[AAlignment];
|
||||
if M <> 0 then Inc(FBytesPerRow, ALIGNBITS[AAlignment] + 1 - M);
|
||||
|
Loading…
Reference in New Issue
Block a user