VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1[2]345678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 17:36:03 03/28/04 Sun
Author: Bjarne Winkler
Subject: Re: Need help with creating one image out of two TIFF images.
In reply to: Michael Crapo 's message, "Re: Need help with creating one image out of two TIFF images." on 13:51:48 03/26/04 Fri

Nike,
Thanks for the feedback. Here is my solution that I created when you where on vacation. Welcome back!

{======================================================}
procedure TFormMain.ActionPrintExecute(Sender: TObject);
{======================================================}
var
Form: TPrintOptionForm;
GraphicPrinter: TDibGraphicPrinter;
Graphic: TDibGraphic;
Rect: TRect;
sTitle: String;
iPos: Integer;
bAbort: Boolean;

procedure PrintWithManualPrintJob;
begin
GraphicPrinter.UsePrintJob := False;
Printer.BeginDoc;
If ImageScrollBoxBack.FileName = '' Then
Begin
GraphicPrinter.Print(ImageScrollBoxFront.Graphic);
End
Else
Begin
Graphic := TDibGraphic.Create;
Graphic.NewImage(ImageScrollBoxFront.Graphic.BitmapInfo.BmpHeader.biWidth,
(ImageScrollBoxFront.Graphic.BitmapInfo.BmpHeader.biHeight * 2),
ifBlackWhite,
nil,
ImageScrollBoxFront.Graphic.XDotsPerInch,
ImageScrollBoxFront.Graphic.YDotsPerInch);
Rect.Left := 0;
Rect.Top := 0;
Rect.Right := ImageScrollBoxFront.Graphic.BitmapInfo.BmpHeader.biWidth;
Rect.Bottom := (ImageScrollBoxFront.Graphic.BitmapInfo.BmpHeader.biHeight * 2);
Graphic.Canvas.Brush.Color := clWhite;
Graphic.Canvas.FillRect(Rect);
Graphic.Canvas.Draw(0, 0, ImageScrollBoxFront.Graphic);
Graphic.Canvas.Draw(0, ImageScrollBoxFront.Graphic.BitmapInfo.BmpHeader.biHeight, ImageScrollBoxBack.Graphic);
GraphicPrinter.Print(Graphic);
Graphic.Free;
End;
Printer.EndDoc;
end;

begin
Try
TimerGetScannerStatus.Enabled := False;

sTitle := ExtractFileName(ImageScrollBoxFront.FileName);
iPos := Pos('.', sTitle);
sTitle := Copy(sTitle, 1, (iPos - 1));
Printer.Title := sTitle;
Printer.Refresh;

GraphicPrinter := TDibGraphicPrinter.Create;
Try
GraphicPrinter.PrintMode := TEnvisionPrintMode(rLocalSetup.PrintInfo.Mode);
GraphicPrinter.Width := StrToFloat(rLocalSetup.PrintInfo.Width);
GraphicPrinter.Height := StrToFloat(rLocalSetup.PrintInfo.Height);
PrintWithManualPrintJob;
Finally
GraphicPrinter.Free;
End;

Finally
TimerGetScannerStatus.Enabled := (CR180Obj <> Nil);
End;
end;

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.