saucecontrol / PhotoSauce

MagicScaler high-performance, high-quality image processing pipeline for .NET
http://photosauce.net/
MIT License
569 stars 49 forks source link

IMultiFrameDecoderOptions support missing for JPEG XL #150

Closed MaceWindu closed 4 months ago

MaceWindu commented 5 months ago

Looks like JPEG XL supports animated images as https://jpegxl.info/test-page/ provides sampe animated jxl file.

saucecontrol commented 4 months ago

I have re-written the decoder plugin in https://github.com/saucecontrol/PhotoSauce/commit/c784500526d66ffe6ae14542ec76c98bacf0d9f7, and it now supports animation.

Skipping frames won't work for all images because of the way libjxl coalesces animation frames. The sample on their test page does work, but any image containing frames that require a content from a previous frame may not have that content available if the frame was skipped. Decoding a limited number of frames from the start of the image should always be fine.