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