Bug 455599 - Last frame of exported JXL has 0 duration
Summary: Last frame of exported JXL has 0 duration
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-19 10:15 UTC by Alvin Wong
Modified: 2022-06-28 18:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2022-06-19 10:15:09 UTC
I suspect the last frame exported to JXL has a duration of 0, because after converting the jxl to png (animated) with `djxl` the last frame has an erratically short frame time in Firefox and doesn't show up at all in IrfanView.

You can use the test file in https://bugs.kde.org/show_bug.cgi?id=455361
Comment 1 Bug Janitor Service 2022-06-20 21:12:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1481
Comment 2 amyspark 2022-06-28 18:51:11 UTC
Git commit f9da97e2d87f3dc2ade94cf4d60699d8b57bad17 by L. E. Segovia.
Committed on 28/06/2022 at 17:31.
Pushed by lsegovia into branch 'master'.

JPEG XL: fix animations with keyframes not in the tail end

There are two compounded issues with frame timing:
- last frames lasting more than a single frame would get trimmed
- once fixed, these would also get a tick chopped off

M  +4    -1    plugins/impex/jxl/JPEGXLExport.cpp
M  +4    -3    plugins/impex/jxl/JPEGXLImport.cpp
A  +-    --    plugins/impex/jxl/tests/data/sources/animated/animation_test.jxl
M  +35   -0    plugins/impex/jxl/tests/kis_jpegxl_test.cpp
M  +1    -0    plugins/impex/jxl/tests/kis_jpegxl_test.h

https://invent.kde.org/graphics/krita/commit/f9da97e2d87f3dc2ade94cf4d60699d8b57bad17
Comment 3 amyspark 2022-06-28 18:52:29 UTC
Git commit e82fc0fd026a2068a86244a71824c108ac651659 by L. E. Segovia.
Committed on 28/06/2022 at 18:51.
Pushed by lsegovia into branch 'krita/5.1'.

JPEG XL: fix animations with keyframes not in the tail end

There are two compounded issues with frame timing:
- last frames lasting more than a single frame would get trimmed
- once fixed, these would also get a tick chopped off
(cherry picked from commit f9da97e2d87f3dc2ade94cf4d60699d8b57bad17)

M  +4    -1    plugins/impex/jxl/JPEGXLExport.cpp
M  +4    -3    plugins/impex/jxl/JPEGXLImport.cpp
A  +-    --    plugins/impex/jxl/tests/data/sources/animated/animation_test.jxl
M  +35   -0    plugins/impex/jxl/tests/kis_jpegxl_test.cpp
M  +1    -0    plugins/impex/jxl/tests/kis_jpegxl_test.h

https://invent.kde.org/graphics/krita/commit/e82fc0fd026a2068a86244a71824c108ac651659