VoyForums

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345[6]78910 ]


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

Date Posted: 03:01:24 04/18/02 Thu
Author: Ralph
Subject: Saving a List of MetaFiles as TIFF

My Application uses a TList of TMetaFiles to process the printing. I now want to enable the users to put the printed docs into an archive (TIFF).

The following code does work - sometimes. The problem seems to be the resolution. The MetaFiles are all in 2100 x 2990 (MMWidth and MMHeight). What's wrong with my source?

Ralph

-----------------------------

FileName := 'C:\Temp.tif';
Stream := TFileStream.Create(FileName, fmCreate);

Tiff := TTiffGraphic.Create;

MaxPage := lsPages.Count;
for nCounter := 0 to (MaxPage - 1) do
begin
mfOutput := TObject(lsPages.Items[nCounter]) as TMetaFile;

Tiff.NewImage(mfOutput.MMWidth,
mfOutput.MMHeight,
ifBlackWhite,
nil,
600, 600);

Rect.Left := 0;
Rect.Top := 0;
Rect.Right := mfOutput.MMWidth;
Rect.Bottom := mfOutput.MMHeight;
Tiff.Canvas.FillRect(Rect);

Tiff.Canvas.Draw(0, 0, mfOutput);

if nCounter = 0 then
Tiff.SaveToStream(Stream)
else
Tiff.AppendToStream(Stream);

end;

Stream.Free;
Tiff.Free;

[ 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.