Hello , please can someone helps me porting this VCL procedure into FMX :
procedure AssignBmp(SrcBmp,DstBmp:TBitmap);
var
_pxlSize : integer;
begin
if(SrcBmp.Width*SrcBmp.Height)=0 then Exit;// 0 size caseSrcBmp.PixelFormat of
pf8bit: _pxlSize :=1;
pf16bit: _pxlSize :=2;
pf24bit: _pxlSize :=3;
pf32bit: _pxlSize :=4;else
raise Exception.Create('AssignBmp Error : Unknown PixelFormat .');
end;tryifSrcBmp.PixelFormat<>DstBmp.PixelFormat
then
// assign the source bitmap pix-format to the target bitmapDstBmp.PixelFormat:=SrcBmp.PixelFormat;ifSrcBmp.Width<>DstBmp.Width
then
// assign the source bitmap width to the target bitmap widthDstBmp.Width:=SrcBmp.Width;ifSrcBmp.Height<>DstBmp.Height
then
DstBmp.Height:=SrcBmp.Height;// copy the source bitmap to the target one Move(SrcBmp.ScanLine[SrcBmp.Height-1]^,DstBmp.ScanLine[DstBmp.Height-1]^,SrcBmp.Width*SrcBmp.Height* _pxlSize
);
except
on E :Exceptiondo raise Exception.Create('AssignBmp Error : '+ E.Message);
end;
Вопрос
randydom
Hello , please can someone helps me porting this VCL procedure into FMX :
so many thanks .
Ссылка на комментарий
2 ответа на этот вопрос
Рекомендуемые сообщения
Присоединяйтесь к обсуждению
Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.