Bug 473418

Summary: Allow other output file-types in BQM custom user script as JPEG-XL.
Product: [Applications] digikam Reporter: Felix Esch <felix.esch.s>
Component: Plugin-Bqm-ScriptAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.1.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 8.2.0
Sentry Crash Report:
Attachments: A screenshot showing the list of available file extensions

Description Felix Esch 2023-08-15 13:54:05 UTC
Created attachment 160985 [details]
A screenshot showing the list of available file extensions

SUMMARY
***
I want to output JPEG XL (.jxl) files when using a custom script (userscript), but the drop down menu only has entries for unchanged, JPEG, PNG and TIFF.
***


STEPS TO REPRODUCE
1. Open Batch Queue Manager
2. Add tool: User Shell Script
3. Select output file type

OBSERVED RESULT
No JPEG XL format is available

EXPECTED RESULT
JPEG XL as an option, including others like WEBP, AVIF, HEIF, JPEG 2000, because they can be converted to using digiKam.

SOFTWARE/OS VERSIONS
Windows: Windows 10
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
The relevant file seems to be (probably among others) this one: https://invent.kde.org/graphics/digikam/-/blob/master/core/dplugins/bqm/custom/userscript/userscript.cpp
Comment 1 Maik Qualmann 2023-08-15 14:37:34 UTC
The output suffix in the user script has nothing to do with the capabilities that digiKam supports. Your script must be able to generate a corresponding file. In theory, we can replace it with a custom field.

Maik
Comment 2 Felix Esch 2023-08-15 15:05:18 UTC
(In reply to Maik Qualmann from comment #1)
> The output suffix in the user script has nothing to do with the capabilities
> that digiKam supports. Your script must be able to generate a corresponding
> file. In theory, we can replace it with a custom field.
> 
> Maik

True, in my case a custom suffix would be a viable solution. Thinking this further, there could even be useful custom processing scripts that do not generate a new output file for each input file (which would currently generate an error message in the BQM), but this seems to be out of scope for this plugin. I'm just a casual user of digiKam anyway.

Felix
Comment 3 Maik Qualmann 2023-08-15 15:22:34 UTC
If your script does not create an output file, you must first copy $input to $output with a command based on the operating system used. All changes are then applied to $ouput in the script.

Maik
Comment 5 Maik Qualmann 2023-08-15 16:47:18 UTC
Git commit 6eafeb1daac5cf23eff29d44875944b516dc8ff3 by Maik Qualmann.
Committed on 15/08/2023 at 18:46.
Pushed by mqualmann into branch 'master'.

add more output formats to BQM user script
FIXED-IN: 8.2.0

M  +1    -1    NEWS
M  +40   -5    core/dplugins/bqm/custom/userscript/userscript.cpp

https://invent.kde.org/graphics/digikam/-/commit/6eafeb1daac5cf23eff29d44875944b516dc8ff3