WEB开发网
开发学院软件开发Delphi 将image的图片保存为JPG格式图片方法 阅读

将image的图片保存为JPG格式图片方法

 2006-02-04 13:50:49 来源:WEB开发网   
核心提示:将image组件的图片保存为JPG格式图片方法PRocedure SaveAsJPG ;var jp: TJPEGImage; //Requires the "jpeg" unit added to "uses" clause.begin jp := TJPEGImage.

将image组件的图片保存为JPG格式图片方法

PRocedure SaveAsJPG ; var   jp: TJPEGImage;  //Requires the "jpeg" unit added to "uses" clause. begin   jp := TJPEGImage.Create;   try    with jp do    begin     jp.CompressionQuality := 2;     jp.Compress ;      Assign(Image1.Picture.Bitmap);     SaveToFile('D:\zhy.jpg');    end;   finally    jp.Free;   end;   ////---读入方法如下: procedure OpenJPGInImage var   jp: TJPEGImage;  //Requires the "jpeg" unit added to "uses" clause. begin   jp := TJPEGImage.Create;   jp.LoadFromFile('D:\zhy.jpg');   try    with jp do    begin     image1.Picture.Bitmap.Assign(jp);    end;   finally    jp.Free;   end; end; 

Tags:image 图片 保存

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接