views:

425

answers:

2

I'm wondering if there's an existing control or if it would be straightforward to develop a control allowing a multipage tiff to be progressively loaded over a network? I'm working with some tiff images that are up to thousands of pages, and it would be great to have the image start to appear as soon as a page or pages are downloaded, and only retrieve additional pages of the image as needed, or download on demand or when bandwidth is available. I realise that a TIFF image has certain structural requirements and surrounding metadata, but expect that this should be possible.

+1  A: 

I don't think any language has a control for this natively. I would grab a copy of the TIFF specification and write my own solution.

http://partners.adobe.com/public/developer/tiff/index.html

You may want to try and adapt existing TIFF viewer controls, however:

http://www.codeproject.com/KB/miscctrl/Image_Viewer_Control.aspx; http://www.atalasoft.com/cs/forums/thread/11473.aspx

I can't vouch for the quality of the above code, however.

taspeotis
Hi -- I'm from Atalasoft. Our products can be adapted to do this. You can't send parts of the TIFF very easily, but you can break TIFF's down into parts (1-page TIFFs), and send them on demand. We'd be happy to help you get it working with our product -- just contact support (http://atalasoft.com/support)
Lou Franco
+2  A: 

I suggest you start using LibTiff or LibTiff.NET. This last one is easy to start with and I have good experiences so far. It will allow you full control over the order of loading. It does depend somewhat on the exact formatting of the tiff you're trying to load. Random access to pages is always possible. Furthermore it will give you good control over memory resource usage.

The previous advice to start with the specification is imho a recipe for a nightmare. There are so many different interpretations of TIFF (including byte ordering dependent on the machine) that you'll spend a lot of time implementing and testing. The LibTIFF is the reference and it has a very mild license form. Please check my question on StackOverflow here

Adriaan
+1 for not reinventing the wheel
PeterAllenWebb