image icon indicating copy to clipboard operation
image copied to clipboard

Support for zif file format?

Open mpizenberg opened this issue 4 years ago • 4 comments

Hi, I'm interested in the zif file format in order to create and visualize very large (800Kx5K pixels) zoomable images. The format seems to be based on a tiled big tiff spec, with tiles composed of jpeg or png images. I'm wondering, how much work do you think would be involved to implement encoders and decoders for the format based on the current state of support of tiff, jpg and png and the format spec listed on the linked page?

mpizenberg avatar Oct 17 '21 16:10 mpizenberg

If I understand that page correctly zif is just a constrained version of BigTIFF:

All forms of ZIF can be read and written with libTIFF v.4.0 and later, and other libraries supporting BigTIFF.

The tiff crate that this crate relies on does have some support for BigTIFF. However, I think the API doesn't currently let you seek to read only specific tiles of an image.

fintelia avatar Oct 17 '21 20:10 fintelia

@fintelia I'd be mostly interested by the encoding part in fact, since the decoding and viewing part would be handled elsewhere, like with a web viewer.

If that comment from @HeroicKatora is still valid though, it seems the tiff crate does not handle tiling.

That's a tiled tiff. We only support strip based files at the moment.

mpizenberg avatar Oct 18 '21 13:10 mpizenberg

That comment is no longer accurate since 0.7.0, although tiled tiffs need to be supported manually:

Decoder::read_tile.

Manually meaning that there is no support for selectively retrieving tiles with tile offsets and configuration, other than doing everything yourself—neverthelss it is feasible do everything through raw tag access.

197g avatar Oct 18 '21 14:10 197g

Thanks @HeroicKatora . I don't see tile primitives for encoding. Would the same be true for encoding? meaning all could be done manually through raw tags?

Anyway, it was a bit intimidating for me for now, so I went for a zoomable format composed of multiple image files (original zoomify format) that I can write directly on disk separately instead of in a zif container.

Feel free to close this issue if you don't want to have "support for ..." issues open until eventually (or never) someone goes back to it.

mpizenberg avatar Oct 19 '21 17:10 mpizenberg