libheif icon indicating copy to clipboard operation
libheif copied to clipboard

Tiled image encodeing

Open rfezzani opened this issue 2 years ago • 5 comments

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:

rfezzani avatar Oct 20 '22 09:10 rfezzani

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.

farindk avatar Oct 20 '22 16:10 farindk

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:.

rfezzani avatar Oct 20 '22 23:10 rfezzani

Is there any plan to support encoding images with tiles?

quhung avatar Mar 21 '24 02:03 quhung

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?

bradh avatar Mar 21 '24 07:03 bradh

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.

farindk avatar Mar 21 '24 07:03 farindk