S
S
sm1tt2016-06-10 14:37:27
mint
sm1tt, 2016-06-10 14:37:27

How to configure image compression from linux mint context menu?

Hello! I just can’t figure out the problem, in Linux Mint the Caja file manager supports scripts from the ~/.config/caja/scripts folder, I put the following script there, which should compress the image with loss of quality:

#!/bin/sh
file=$CAJA_SCRIPT_SELECTED_URIS
jpegoptim -m40 $file
zenity --info --text="Сжатие фото успешно завершено!"
fi

But I just can’t understand why the jpegoptim -m40 $file command does not work, help me figure it out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sm1tt, 2016-06-11
@sm1tt

В общем, сам нашел решение:

#!/bin/sh
IFS="
"
f=$CAJA_SCRIPT_SELECTED_FILE_PATHS
for i in $f;
do
convert "$i" -quality 20 "$i";
done
zenity --info --text "Изображения успешно сжаты!"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question