jvcllaz: Fix JvPicClip demo occasionally showing black extracted images on 64-bit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6979 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-05-30 20:13:30 +00:00
parent a7ced24331
commit 3bc0347094
2 changed files with 4 additions and 6 deletions

View File

@ -251,12 +251,12 @@ end;
function TJvPicClip.GetGraphicCell(Index: Integer): TBitmap;
begin
CheckIndex(Index);
AssignBitmapCell(Picture.Graphic, FBitmap, Cols, Rows, Index);
if Picture.Graphic is TBitmap then
if FPicture.Graphic is TBitmap then
if FBitmap.PixelFormat <> pfDevice then
FBitmap.PixelFormat := TBitmap(Picture.Graphic).PixelFormat;
FBitmap.TransparentColor := FMaskColor or PaletteMask;
FBitmap.Transparent := (FMaskColor <> clNone) and Masked;
AssignBitmapCell(Picture.Graphic, FBitmap, Cols, Rows, Index);
Result := FBitmap;
end;