Hey Joe;

Not an easy task - but it can be done 

Methode:

You need to know that a tiff file has a directory with offset to values and
images and next directory entry:

A tiff file contains of a header with:

"II"       Prefix - II is when integers is in intel format  
X0000      The version 
X00000000  The offset to the first directory (from top of file)


Now the Directory - with tagged values hench the name tiff ( tagged image
file)

X0000      Number of entries 

X0000      Tag name
X0000      Type 
X0000      value (Mantisa)
X0000      value (base)

X00000000  Offset to next directory or zero if end of file


Take a close look at page 20 of
http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf

As you can see the are lots off offsets, But you can patch them if you like.



I have dnoe it with a two pass process: 

1) First pass: reading all tiff files in the list and taking all the
directories (just store the in memory) 
2) Second pass: reading all image data (called strips) and put it in an out
file just after the signature "IIxxyyzzzz"

3) Now I know where all images is stored - so I reconstruct the the
directory for each images and append it to the file

4) Finaly I back patch the file and put the offset of the firs directory in
the signature (the zzzz) above.

Good luck :) 

Niels Liisberg

IceBreak.Org



        


-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Joe Wells
Sent: 25. oktober 2006 16:48
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Combining Multiple TIF Images

I have written an RPG CGI program that streams a tif image to the browser
(Content-Type: image/tiff) and it works great.  Now, I need to send multiple
tif images to the same browser window so the user can page through them
seamlessly.  Can anyone tell me what would be involved in "gluing" the tif
images together?  I assume there is some sort of header and footer that
would need to be massaged.

Thanks,

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.