SUMMARY When using "Render Animation" after setting the "Render as:" value to "Animated PNG Image", the "Video Location" line for the output file specifies the file extension.png instead .apng The content of the exported video file corresponds to the file extension .apng But a video file with the .png file extension may not be imported correctly into other video editors (for example VSDC) Manual correction .png to .apng in the "Video Location" line is reset when the "Render Animation" window is restarted STEPS TO REPRODUCE use "Render Animation" to set " Render as:" to "Animated PNG Image" and export the animation. OBSERVED RESULT Exported video file with .png extension The content of the exported video file corresponds to the file extension .apng EXPECTED RESULT Exported video file with .аpng extension Krita Version: 5.0.2 Languages: en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, en_US, en, ru_RU, ru, en_US, en Hidpi: true Qt Version (compiled): 5.12.12 Version (loaded): 5.12.12 OS Information Build ABI: x86_64-little_endian-llp64 Build CPU: x86_64 CPU: x86_64 Kernel Type: winnt Kernel Version: 10.0.19044 Pretty Productname: Windows 10 (10.0) Product Type: windows Product Version: 10
I can confirm that this is the case for the 5.0.2 appimage and the Mar 13 5.1.0-prealpha (git 620fbcbdcb) appimage on Debian 10. When 'Animated PNG Image' is selected, the output video file location is set to .png. (This can be manually corrected if the user notices it.) If the 'Select file name' icon is clicked then the file name extension is changed to .apng.
Since I worked on this code, can I assign this bug to myself?
Sure!
This is a feature, not a bug. In KisDlgAnimationRenderer::defaultVideoFileName we see: videoFileName = QString("%1%2%3.%4").arg(path).arg('/').arg(baseName).arg(KisMimeDatabase::suffixesForMimeType( mimeType == "image/apng" ? "image/png":mimeType ).first()); Please confirm it is OK to remove the "feature", it is not a big work for us to do this. If I just remove this override, KisMimeDatabase database suggests .apng for image/apng and the file name is suggested as expected. Also, calling first() on empty list may result the undefined behavior. We should probably have a check there.
@Bourumir Wyngs - The problem here isn't the mimetype, the problem here is the format. When you save via dialog, the default format is .apng, and the default in the entry is .png. It should be consistent. While technically, both apng and png formats are correct formats. Since apng has not officially be accepted by the PNG WorkGroup it probably make sense to keep the format apng.
Git commit 74264d2a7f70b179dbc52dc837a1249a0bd288f4 Mon, 21 Mar 2022 01:14:30 -0400 [PATCH] Bugfix: Make APNG format for export consistent This patch makes apng the default format in the filename textbox for export instead of png, making it consistent with the file dialog. Fixes BUG #451473 --- libs/ui/animation/KisDlgAnimationRenderer.cpp | 4 ++-- libs/ui/animation/VideoExportOptionsDialog.cpp | 4 ++-- libs/ui/animation/VideoExportOptionsDialog.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) https://invent.kde.org/graphics/krita/-/commit/74264d2a7f70b179dbc52dc837a1249a0bd288f4