VoyForums

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


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

Date Posted: 01:47:29 05/20/04 Thu
Author: glup
Subject: Re: SaveToFile only saves the current page
In reply to: Norrit 's message, "Re: SaveToFile only saves the current page" on 03:16:02 05/19/04 Wed

>I goto the second page, rotate it and now I want to
>store this modification in the same image ...
>How can I achieve this with a AppendToFile
>constructure ???

Thats quiet straight forward:
1. Go to the first page:
Graphic.CurrentFrame := 1;
2. Create the TIFF Header and add that page:
Graphic.SaveToStream(aStream);
3. Add remaining pages:
for wPage := 2 to Graphic.FrameCount do begin
Graphic.CurrentFrame := wPage;
Graphic.AppendToStream(aStream)
end;

This possibly looks odd, but thats how the libtiff works. In pricipe there would also be a possibility to modify in the existing file, but that will create fragmentation and the tiff spec has not standard how to mark "free blocks".
So the advantage of this "odd" method is that your filesize remains as small as possible.

Some tags (e.g. for ICC profiles) require that the build in libtiff was compiled for support of it. Perhaps Michael documents the switches he had used ;-)

The REALLY bad thing about that method is that non-standard tags in the original file may be not moved to new file, since libtiff does not have a clue of them.
The tags that are supported by libtiff are described in <a rel=nofollow target=_blank href="http://www.libtiff.org/man/TIFFGetField.3t.html.">http://www.libtiff.org/man/TIFFGetField.3t.html.</a> Additionall you could expect that envision will copy "its custom tags".

I argue since a long time to extend the TIFF support... libtiff could more.

rgds

:-glup

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