delphi – 如何清除jpeg图像?
发布时间:2020-12-15 04:22:25 所属栏目:大数据 来源:网络整理
导读:如何清除TJPEG Image图像? JPG.Width:= 0技巧不起作用. 另外,我不想创建一个空位图(0x0像素)并将其分配给jpeg. 解决方法 你可以使用这样的东西(这里使用插入的类来访问受保护的方法): type TJPEGImage = class(jpeg.TJPEGImage);implementationprocedure
|
如何清除TJPEG
Image图像?
JPG.Width:= 0技巧不起作用. 解决方法
你可以使用这样的东西(这里使用插入的类来访问受保护的方法):
type
TJPEGImage = class(jpeg.TJPEGImage);
implementation
procedure TForm1.Button1Click(Sender: TObject);
var
JPEGImage: TJPEGImage;
begin
JPEGImage := TJPEGImage.Create;
try
// this should recreate the internal bitmap
JPEGImage.NewBitmap;
// this should recreate the internal image stream
JPEGImage.NewImage;
// here the memory used by the image should be released
finally
JPEGImage.Free;
end;
end;
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
