这是indexloc提供的服务,不要输入任何密码
Skip to content

intermediate coalescing modes / handling exotic blend sources/modes #1886

@jonsneyers

Description

@jonsneyers

Not related to this, but another coalescing mode that would be good to have for animation display, is one where the returned frames are blended but only the crop box containing modified pixels gets returned (so it only returns kReplace frames like the default coalescing, but not necessarily canvas-sized ones). This has obvious advantages in terms of buffer sizes and would allow e.g. browsers to have a higher likelihood of being able to keep the entire animation in memory.

So I think we basically need one boolean setting to indicate whether zero-duration frames should be blended or not, and another boolean setting to indicate whether cropped frames should be returned or canvas-sized ones. We currently only have an option where it is (true,false) (the default coalescing==true) and another where it is (false,true) (this is what coalescing==false does).

And then we need to find a way for dealing with exotic blend source choices; probably this is something most applications will not want to deal with so it's probably best if by default anything that is not a simple "stack of layers" gets converted in something that is (we can always do the blending and turn anything into a kReplace frame that overwrites the whole canvas), and only when some new option is set, you can get the original thing which may be quite exotic.
Also it would be good to have a way to tell the decoder not to return 'exotic' blend modes (i.e. not kReplace and not kBlend), since in many cases (like Gimp) the application will already know about replace and blend but not about the other blend modes.

Originally posted by @jonsneyers in #1863 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to the libjxl APIdecoderRelated to the libjxl decoderunrelated to 1.0Things that need not be done before the 1.0 version milestone

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions