There is two ways to run a script
1) internally in mtpaint --> look for 'Script' menu item
Examples to convert to RGB
-image/rgb
-image/'Convert to RGB'
2) a script file --> it must have its permissions set to 'execute'
Instructions: CD to folder containing script and in terminal type ./script_name
Here's an example to change a folder of greyscale jpegs made in gimp
to RGB greyscale images. Your script can be located anywhere.
Your images are located in /root/my_images/
Code: Select all
for ZAD in /root/my_images/*.jpg ;do
SUFFIX=_mod
echo ZAD= $ZAD
mtpaint --cmd -file/open="$ZAD" -image/rgb -file/as="$ZAD"$SUFFIX
mv -f "$ZAD"$SUFFIX.jpg "${ZAD%.jpg}"$SUFFIX.jpg
done
I've noticed that if there is a jpeg image in the folder that is already RGB
then there will be an error written to screen
This isn't a serious error but I thought I'd mention it to you.'-image/rgb' matches a disabled item
The original file is left alone.
_________________________________________________