var
FWidth,FHeight :Integer;
FSize :Byte;
begin
////////width and height
FWidth :=Image.Picture.Bitmap.Width;
FHeight :=Image.Picture.Bitmap.Height;
///////byte sizes
if Image.Picture.Bitmap.PixelFormat=pf24bit then //真彩 : 每个像素占3个字节
FSize :=FWidth*FHeight*3;
if Image.Picture.Bitmap.PixelFormat=pf8bit then //256色 : 每个像素占1个字节
FSize :=FWidth*FHeight;
end;