Delphi Port code from VCL into FMX

  

I’ve this BitmapDecoder module

function DecryptBmp(FHandle:pointer; FBitmap,FData:pointer; DataSize:integer):boolean;cdecl; external ‘BmpDecrypter.dll’;

i’ve used it with VCL in this way :

procedure TBmpDecrypter.Decrypt(ASourceData: pointer; ASourceSize: integer);
var
isDecrypted:boolean;
begin

if FHandle = nil then Exit;

isDecrypted:= DecryptBmp(FHandle, FDestBmp.ScanLine[FDestBmp.Height-1],ASourceData, ASourceSize);
if isDecrypted then
ShowMessage(‘Bmp decrypted with success’)
else
ShowMessage(‘Bmp can”t be decrypted !’)

end;

So please how can i port this into FMX , Just this part :

DecryptBmp(FHandle, FDestBmp.ScanLine[FDestBmp.Height-1]{Can we use the TBitmapData here ?},ASourceData, ASourceSize);

many thanks

Comments are closed.