G
gc1848
Unregistered / Unconfirmed
GUEST, unregistred user!
var
jpg: TJPEGImage;
bmp: TBitmap;
SourceJpg: TJPEGImage;
picturewidth,pictureheight,width1,height1:integer;
widthtimes,heighttimes,smalltimes:real;
begin
try
bmp := TBitmap.Create;
SourceJpg := TJPEGImage.Create;
Jpg:= TJPEGImage.Create;
//读取源文件
SourceJpg.LoadFromFile(SourceFileName);
//计算缩小比例
Width := SourceJpg.Width ;
height := SourceJpg.Height ;
为什么WIdth和height的最大值只能是1036*780
我用780*1036的图会变成780*780
2000*3000的图会变成的1036*780
1536*700的图会变成1036*700
jpg: TJPEGImage;
bmp: TBitmap;
SourceJpg: TJPEGImage;
picturewidth,pictureheight,width1,height1:integer;
widthtimes,heighttimes,smalltimes:real;
begin
try
bmp := TBitmap.Create;
SourceJpg := TJPEGImage.Create;
Jpg:= TJPEGImage.Create;
//读取源文件
SourceJpg.LoadFromFile(SourceFileName);
//计算缩小比例
Width := SourceJpg.Width ;
height := SourceJpg.Height ;
为什么WIdth和height的最大值只能是1036*780
我用780*1036的图会变成780*780
2000*3000的图会变成的1036*780
1536*700的图会变成1036*700