المشاركات : 136
المواضيع 20
:
: 0
الإنتساب : Feb 2008
السلام عليكم
كيف استطيع طباعة صورة موجودة في اداة image من النوع jpg
ولكم جزيل الشكر
المشاركات : 2,293
المواضيع 157
:
: 81
الإنتساب : Dec 2008
وعليكم السلام ورحمة الله
PHP كود :
uses
Graphics, Printers,
JPEG; { For JPEG image support }
// ...
{ With scaling support }
procedure PrintFile(sImageFileName: string);
var
TempImage: TImage;
begin
try
TempImage := TImage.Create;
with TempImage do begin
Visible := False;
Stretch := False;
with Picture do begin
AutoSize := True; { So the component will have the right size }
LoadFromFile(sImageFileName);
AutoSize := False;
with Printer do begin
BeginDoc;
if Height > Canvas.Height then
Height := Canvas.Height;
if Width > Canvas.Width then
Width := Canvas.Width;
EndDoc;
end;
end;
end;
finally
TempImage.Free;
end;
end;
...
اللهم احقن دماء المسلمين، لا تنسوهم بالدعاء...
المشاركات : 136
المواضيع 20
:
: 0
الإنتساب : Feb 2008
شكرا
جزاك الله كل خير
ياريت لو توضح اكثر بمثال