我程序是这样的,请问为什么同样的图片在使用普通打印,和照片质量打印的时候,大小不一样?
procedure TForm1.PrintImg;
var
ScaleX, ScaleY, temp: Integer;
R: TRect;
begin
if printdialog1.Execute then
begin
Printer.BeginDoc;
Printer.
with Printer do
try
ScaleX := GetDeviceCaps(Handle, logPixelsX) div
PixelsPerInch;
ScaleY := GetDeviceCaps(Handle, logPixelsY) div
PixelsPerInch;
temp := GetDeviceCaps(Handle, logPixelsX);
R := Rect(10, 10, Image2.Picture.Width * (ScaleX-1),
Image2.Picture.Height * (ScaleY-1));
Canvas.StretchDraw(R, Image2.Picture.Bitmap);
//Canvas.CopyRect(R,Image2.Canvas,Rect(0,0,Image2.Width,Image2.Height));
finally
EndDoc;
end;
end;
end;