Z
zbzb
Unregistered / Unconfirmed
GUEST, unregistred user!
想转换BMP到JPG,通常就是
uses
JPEG;
procedure Bmp2Jpg(IBmp: TBitmap; OJpg: WideString);
var
Jpg: TJPEGImage;
begin
Jpg:=TJPEGImage.Create;
try
Jpg.Assign(IBmp);
Jpg.SaveToFile(OJpg);
finally
Jpg.Free;
end;
end;
这段代码在程序里面调用,都非常OK的;
问题是只要转移到DLL中,就不能用了!!提示“Cannot assign a TBitmap to a TJPEGImage”,有哪位大侠知道为什么?
uses
JPEG;
procedure Bmp2Jpg(IBmp: TBitmap; OJpg: WideString);
var
Jpg: TJPEGImage;
begin
Jpg:=TJPEGImage.Create;
try
Jpg.Assign(IBmp);
Jpg.SaveToFile(OJpg);
finally
Jpg.Free;
end;
end;
这段代码在程序里面调用,都非常OK的;
问题是只要转移到DLL中,就不能用了!!提示“Cannot assign a TBitmap to a TJPEGImage”,有哪位大侠知道为什么?