View Single Post
Old 01-17-2023, 09:33 PM   #2
djrx
Junior Member
djrx began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jan 2023
Device: Kindle Scribe (2022)
Depends on your operating system. If you're using Linux/Mac, you can install Homebrew. Once brew is installed, you can install imagemagick

Quote:
If source is too big
Install ImageMagick using Homebrew

$/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$brew install imagemagick

### Set the max file size
for i in *.jpg; do
convert "$i" -define jpeg:extent=500kb "${i%.jpg}-new.jpg"
done


### To change just the quality of the file
for i in *.jpg; do
convert "$i" -quality 80% "${i%.jpg}-new.jpg"
done


### Or if no need to keep the original
for i in *.jpg; do
mogrify -quality 80% *.jpg
done


### convert png to jpg
for i in *.png; do
convert "$i" "${I%.png}.jpg"
done

OR

magick mogrify -format jpg *.png
rm *.png
Just copy and paste the whole block of lines for the options you want into a terminal window and go to town
djrx is offline   Reply With Quote