Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, October 18, 2006 4:08:30 AM(UTC)

Groups: Registered
Posts: 2

Hi everyone,

i have to convert existing tiffs into multipage tiffs after adding some additional tags. Each page is allowed to have only one sorted IFD to contain all tags in. Each page has to be a single strip tiff, e.g. tag 278 (rows per strip) has to be -1 (all hex(ff)).

Does anyone have a clue, how to manage that?

Many thanks



Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, October 19, 2006 12:02:57 PM(UTC)


Groups: Manager, Tech Support
Posts: 367

Using our LEADTOOLS imaging toolkits, you can save TIFF files in either strips or tiles, and you can make it single strip. About tag 278 (RowsPerStrip), the toolkit automatically sets it to the strip height, but you can reset it to -1 if you want. About other requirements (sorted IFD), they are not explicitly documented, but I'm attaching a 2 page file (page 1 compressed CCITT G4, page 2 uncompressed) so that you can check if it matches your needs.
I tested with our Main OCX control, but you can use our other programming interfaces if you want.
Here's the code I used (VB6):
LEAD1.Load "ocr1.tif", 0, 1, 1
LEAD1.SaveTileHeight = -1 'this value will not be saved automatically
LEAD1.SaveTileWidth = LEAD1.BitmapWidth * 2
'setting the tag manually
Dim myArray(1) As Long
myArray(0) = -1
LEAD1.SetTag 278, TAG_LONG, 1, myArray

'Save first page
LEAD1.Save "TestMinusOneTileHeight.tif", FILE_CCITT_GROUP4, 1, 0, SAVE_OVERWRITE

'Set tag for first page
LEAD1.WriteTag "TestMinusOneTileHeight.tif", 1

' make second page white on black

'Save second page
LEAD1.Save "TestMinusOneTileHeight.tif", FILE_TIF, 1, 0, SAVE_APPEND
'Set tag for second page
LEAD1.WriteTag "TestMinusOneTileHeight.tif", 2

File Attachment(s):
TestMinusOneTileHeight.zip (193kb) downloaded 29 time(s).
Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.295 seconds.