Skip to content

Commit

Permalink
FIX: FireMonkey constants changed (#35)
Browse files Browse the repository at this point in the history
Works in older Delphi version as well, new enum values are available for some time already.
  • Loading branch information
holgerflick committed Nov 25, 2023
1 parent d1182b2 commit 4627e3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extensions/ImagingFmx.pas
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ procedure ConvertFmxBitmapToImageData(const Bitmap: TBitmap; Image: TImageData);
X, Y, Bpp, SrcWidthBytes: Integer;
TargetInfo: TImageFormatInfo;
begin
Bitmap.Map(TMapAccess.maRead, MapData);
Bitmap.Map(TMapAccess.Read, MapData);
GetImageFormatInfo(Image.Format, TargetInfo);

Bpp := TargetInfo.BytesPerPixel;
Expand Down Expand Up @@ -232,7 +232,7 @@ procedure CopyRectToFmxBitmap(const Image: TImageData; Bitmap: TBitmap;
SrcWidthBytes := Image.Width * Bpp;
MoveBytes := Width * Bpp;
SrcPtr := @PByteArray(Image.Bits)[SrcY * SrcWidthBytes + SrcX * Bpp];
Bitmap.Map(TMapAccess.maReadWrite, MapData);
Bitmap.Map(TMapAccess.ReadWrite, MapData);

for Y := 0 to Height - 1 do
begin
Expand Down

0 comments on commit 4627e3b

Please sign in to comment.