Skip to content

452473 webp: implement animation and metadata handling

Amy spark requested to merge lsegovia/krita:work/amyspark/webp into master

This PR was initially meant to implement ICC reading, but as it turns out, following the official documentation just gives me three for the price of one 😸

Thus, in this MR I've implemented, following the existing JPEG XL support (!1363 (merged)):

  • metadata read/write
  • animation handling
  • ICC profile handling
  • test suite (includes animation!)

There's a small price to pay, namely the import is no longer configurable, and so the corresponding dialog has been removed. I've only hardcoded use_threads and mode to ensure we keep using multithreading and the BGRA output mode we need for our RGBA8 color space.

This PR only adds a single string ("Save as animated WebP"), so it may be cherry-picked post 5.1 release.

BUG: 452473

Test Plan

Build Krita. Open the attached WebP images and ensure they display as expected.

In particular:

  • Verify the loading_16.webp file shows a 32 FPS, 24-frame animation of a spinning wheel.
  • Ensure the attachment in the bug report is loaded as WideRGB.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Amy spark

Merge request reports