Hi Alan,

On 12/04/2023 14:05, Alan Snyder wrote:
Isn’t there a deeper issue here?

I ran into a problem trying to analyze an image using a filter. The code was 
waiting for ALLBITS to be reported (as well as ERROR conditions), but for an 
animated GIF that never happens. I worked around that problem by stopping when 
a FRAME was reported, which was good enough for my purposes.

This is what this fix does: ALLBITS is never set for animated images, so FRAMEBITS is also added.

I did not see any way to indicate that I did not want an animation or to 
determine when every frame had been produced once.

In the test code, when MediaTracker.waitForAll() returns, which indicates the image is loaded completely, only WIDTH, HEIGHT and PROPERTIES bits are set. FRAMEBITS bit is set only after the image starts animating.

Did I miss something?

There are many places where ALLBITS is tested. Are all of these places at risk 
when operating on an animated GIF?

I did a quick search for ALLBITS, I can see both FRAMEBITS | ALLBITS are used in many places; however, there are quite a few places in the code where ALLBITS is used exclusively, it may cause issues if used with animated images.

Implementing animation by simulating an image of infinite size seems like a bad 
idea, to put it mildly.


<SNIP>
--
Regards,
Alexey

Reply via email to