strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.71k stars 298 forks source link

Tiled image encodeing #692

Open rfezzani opened 1 year ago

rfezzani commented 1 year ago

I have a large tiled image (DZI like) and I would like to convert it to HEIF format. I see that decoding tiled images is supported https://github.com/strukturag/libheif/blob/18291ddebc23c924440a8a3c9a7267fe3beb5901/libheif/heif_context.cc#L1324 but I can't find any reference on tiled images encoding. Can anyone please point me to some documentation or example or any useful material. Sorry if it is not the right place to ask. :pray:

farindk commented 1 year ago

Tiled images are only supported in the sense that they can be decoded as a whole. There is currently no API to decode only some tiles or to encode images with tiles. But this is something that may be added in the future.

rfezzani commented 1 year ago

Thank you @farindk for your answer.

But this is something that may be added in the future.

That would be a great addition :slightly_smiling_face: that may ease the adoption of libheif in communities manipulating huge images like whole slide images :wink:.

quhung commented 6 months ago

Is there any plan to support encoding images with tiles?

bradh commented 6 months ago

I don't see any reason why it couldn't be added given a suitable implementation. I do not think any feature like that is scheduled though.

Are you in a position to do the work, or fund someone to do it on your behalf?

farindk commented 6 months ago

It can definitely be added, but it's not something that can just be added on top. A clean implementation will need some more complex restructuring of the current code. Probably also needs an updated plugin interface (concurrency), ... When this will happen depends on how much of my time I can devote to this.