<div dir="ltr">I am new here, but I have contributed to other open source projects before.<div>I have signed the contributor agreement and read through the contributor info provided on the GitHub repository.<br></div><div>The GitHub page says to discuss new features here, so here is my proposal.<br></div><div><br></div><div>Summary<br>-------<br><br>I would like to contribute code with the purpose of extending the PNG image loader to handle animated PNGs as specified by the APNG standard.<br>The APNG specification can be found here: <a href="https://wiki.mozilla.org/APNG_Specification" target="_blank">https://wiki.mozilla.org/APNG_Specification</a><br><br>Goals<br>-----<br><br>Enable JavaFX to be able to load APNGs as animated images.<br><br>Motivation<br>----------<br><br>APNG is an extension of the PNG format that allows for animation.<br>APNG images can be used as a higher quality alternative to GIF.<br>The APNG standard is supported by all major modern internet browsers.<br><br>JavaFX can already load animated GIFs, so additionally supporting animated PNGs makes sense.</div><div><br>Description<br>-----------<br><br>To support APNGs, the PNGImageLoader2 and PNGIDATChunkInputStream classes need to be modified so they can process the animation chunks acTL, fcTL, fdAT.<br><br>Values from the acTL and fcTL chunks can simply be read like the image header chunk.<br>The metadata for the frame can be updated based on these values.<br><br>The fdAT chunks store data in exactly the same way as the IDAT chunks and can be handled by the PNGIDATChunkInputStream class with little modification.<br><br>Once a new frame of image data has been decompressed, it will need to be composited with the frame buffer based on the blend OP code.<br>Then, the frame buffer needs to be updated based on the disposal OP code.<br>The composting process can be handled in a similar way to how JavaFX handles GIFs.<br><br>After compositing, the ImageFrame can be returned.<br><br>Testing<br>-----------<br><br>Other than unit tests, I am not sure.<br>I would like some advice on what to include for testing.<br><br>Dependencies<br>------------<br><br>This change should not require any additional dependencies.<br></div><div><br></div><div><br></div><div>Thanks,</div><div>-Ethan Hall</div></div>