This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Make a script: batch convert .exr to .psd

Tags: None
(comma "," separated)
User avatar
doraynico
Registered Member
Posts
19
Karma
0
OS
Hi,
I generate .exr from blender. Those exr return black images in image magic, gimp, xn view... Only krita manages to read them correctly.
I need to convert theese exr to psd.
Is it possible to make a script in krita to batch convert all my exr to psd?

Thanks for your help.


User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
You don't need a script, you can use Krita's commandline options to convert images and use that in a shell script.
User avatar
Deevad
Registered Member
Posts
451
Karma
1
OS
+1 with @Halla

Check the documentation about command line here: https://docs.krita.org/en/reference_man ... _line.html

I haven't tested, but based on the documentation, the command line you are looking for might be:

Code: Select all
krita input.exr --export --export-filename output.psd


User avatar
doraynico
Registered Member
Posts
19
Karma
0
OS
Hi,
Thank you for responding
I have seen the documentation.

Is it possible to convert all the files.exr in a specified folder to files.psd

have a nice day


User avatar
Deevad
Registered Member
Posts
451
Karma
1
OS
If you are familiar with Python, it is certainly possible to make that in Krita.

Here i'm not, so I would use command line for that. Once you have the command line for a single convert, you can write a Bash script loop to automatize the task to multiple files.

Here is a quick example, (not tested).

Code: Select all
#!/bin/bash

for input in *.exr ; do
   output=${input/.exr/.psd}
   krita $input --export --export-filename $output
done



Save this code in your directory with all your exr frames as a exr-to-psd.sh text file. Give this file permission execution ( chmod +x exr-to-psd.sh ) . Then execture the script in the directory ( ./exr-to-psd.sh ).


User avatar
doraynico
Registered Member
Posts
19
Karma
0
OS
tHANKyou Deevad for all,
I will make a try and we will see.

PS: je suis ton travail et toutes les infos que tu donnes sur le libre depuis pas mal d'années déjà et je trouve ça super!




Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]