//AValue 为图片文件流头两个字节
function GetImageExt(AValue: Cardinal): String;
begin
case AValue of
$4D42, $424D: Result := '.bmp';
$D8FF, $FFD8: Result := '.jpg';
$4947, $4749: Result := '.gif';
$050A, $0A05: Result := '.pcx';
$5089, $8950: Result := '.png';
$4238, $3842: Result := '.psd';
$A659, $59A6: Result := '.ras';
$DA01, $01DA: Result := '.sgi';
$4949: Result := '.tiff';
else Result := '';
end;
end;
联系客服