Allow to export animation to PNG sequence using commandline
ClosedPublic

Authored by KonstantinDmitriev on Mar 12 2019, 11:18 AM.

Details

Summary

Implementation of feature request made in https://bugs.kde.org/show_bug.cgi?id=364046

This patch adds new commandline option "--export-sequence". Just like "--export" option, it should be used together with "--export-filename" option.

Example:

krita --export-sequence --export-filename ../../persistent/output/file.png /home/appimage/persistent/test.kra

If KRA file has no animation, then this command prints "This file has no animation." error and does nothing.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a reviewer: Krita. · View Herald TranscriptMar 12 2019, 11:18 AM
Restricted Application added a project: Krita. · View Herald Transcript
KonstantinDmitriev requested review of this revision.Mar 12 2019, 11:18 AM

Actually, export should work for any image format supported by Krita. ^__^

Hi, @KonstantinDmitriev!

Does it mean that the animation is exported with the "lastly used configuration"?

No, the export format depends on extension specified in output filename.

So, with this command it is possible to export jpg sequence:

krita --export-animation --export-filename ../../persistent/output/file.jpg /home/appimage/persistent/test.kra

The patch works fine. The only concern I have is the naming of the option. This very option exports "sequence", not "animation". Actually, we can either export a "video" or a "sequence". We have no term "animation" in the main dialog :)

Export sequence:
krita --export-sequence --export-filename some-file.png video.kra

Export video:
krita --export-video --export-filename some-file.mkv video.kra

If it right now only exports frame sequences, then yes, --export-sequence or --export-frames might be much better.

In the future the functionality of this option can be extended to export video files as well. So, I am proposing to keep current name to avoid having two options for exporting animation in the future.

We have no term "animation" in the main dialog :)

I just would like to point out that menu item is called "File" -> "Render Animation". ^__^

In the future the functionality of this option can be extended to export video files as well. So, I am proposing to keep current name to avoid having two options for exporting animation in the future.

The problem is that you can export both: "sequence of GIF images" and "GIF animation", so you cannot distinguish the user's desire by just a file extension

Ah now I see. I haven't thought about that case. ^__^

Changed "--export-animation" option to "--export-sequence".

KonstantinDmitriev edited the summary of this revision. (Show Details)Mar 12 2019, 1:05 PM
dkazakov accepted this revision.Mar 12 2019, 1:35 PM

It should be fine now :)

This revision is now accepted and ready to land.Mar 12 2019, 1:35 PM

@KonstantinDmitriev can you give a firstname/lastname(well, I guess we know this already) and an email so we can push this in your name?

This revision was automatically updated to reflect the committed changes.