C
clark
Unregistered / Unconfirmed
GUEST, unregistred user!
if UpperCase(ExtractFileExt(OpenDialog1.FileName))='.JPG' then
begin
JpegOpened:=TJPEGImage.Create;
JPEGOPened.LoadfromFile(OpenDialog1.FileName);
Image1.Height:=JPEGOpened.Height;
Image1.Width:=JPEGOpened.Width;
image1.Canvas.Draw(0,0,JPEGOpened);
Image1.Top:=0;
Image1.Left:=0;
image1.Visible:=true;
imageheight:=JPEGOpened.Height;
imagewidth:=JPEGOpened.Width;
JPEGOpened.Free;
SaveASDat1.Enabled:=true;
Save1.Enabled:=False;
Caption:=Caption+':'+inttostr(imagewidth)+'*'+inttostr(imageheight);
end;
这是程序的一部分,image1(TImage部件)的尺寸往往不正确!why?help please
begin
JpegOpened:=TJPEGImage.Create;
JPEGOPened.LoadfromFile(OpenDialog1.FileName);
Image1.Height:=JPEGOpened.Height;
Image1.Width:=JPEGOpened.Width;
image1.Canvas.Draw(0,0,JPEGOpened);
Image1.Top:=0;
Image1.Left:=0;
image1.Visible:=true;
imageheight:=JPEGOpened.Height;
imagewidth:=JPEGOpened.Width;
JPEGOpened.Free;
SaveASDat1.Enabled:=true;
Save1.Enabled:=False;
Caption:=Caption+':'+inttostr(imagewidth)+'*'+inttostr(imageheight);
end;
这是程序的一部分,image1(TImage部件)的尺寸往往不正确!why?help please