xlllka.blogg.se

Linux imagemagick scripts to reduce photo size
Linux imagemagick scripts to reduce photo size







linux imagemagick scripts to reduce photo size

SIZE="$(zenity -entry -title="Picture Resize" -text="Enter maximum width.")"ĭone | zenity -progress -title="Picture Resize" -text="working.I really hate it how digital cameras now create files that are stupidly big, every photo that I use - and most of those that others use only ever stay on the screen. # Enter new width (12px-2048px) and check it - aspect ratio will be maintained. If ] || ] thenĪlso, if your entered size value is the width of the new image, you should probably change the phrasing of the first dialog from "Enter maximum size." to something more descriptive of what you're doing, like: "Enter new width (12-2048px) - aspect ratio will be maintained." If I select more than one picture, I don't have these custom action, even if it works with the script above. When I enter a size smaller than 12px, the script halts (I have the error message for a bigger size, these part work) the script doesn't work (when I enter a value, ce script asks me again to enter a value) Zenity -error -text="$SIZE"px" is outside the accepted range: 12px - 2048px!"Ĭonvert "$PICPATH/$1" -resize "$SIZE" -quality 95 -interlace line "$SIZE"px"-$1" SIZE="$(zenity -entry -title="Picture Resize" -text="Enter maximum size.")" # get the new size, check it and set output directory path ] & zenity -info -title="Picture Resize" -text="All done!" || zenity. || mkdir "$PICPATH/$OUTPATH"Ĭonvert "$PICPATH/$1" -resize "$SIZE%" "$PICPATH/$OUTPATH/resized_$SIZE%-$1"ĭone | zenity -progress -title="Picture Resize" -text="working." -percentage=0. It doesn't work for :Īny value I give to percentage, I have an error message : ".% is outside the accepted range" ] & zenity -info -title="Picture Resize" -text="All done!"|| zenity. # check return value and print message depending on it Zenity -error -text="$SIZE% is outside the accepted range: 1% - 1000%!"Ĭonvert "$PICPATH/$1" -resize "$SIZE%" -quality 95 -interlace line "$SIZE%-$1"ĭone | zenity -progress -title="Picture Resize" -text="working." -percentage=0 -auto-close SIZE="$(zenity -entry -title="Picture Resize" -text="Enter percentage.")" # get the new size percentage, check it and set output directory path Make sure ImageMagick is installed and \"$command\" is executable."

linux imagemagick scripts to reduce photo size

Zenity -error -text "Could not find \"$command\" application.\n # Check if ImageMagick commands are found









Linux imagemagick scripts to reduce photo size