mogfify bugfix
This commit is contained in:
parent
8347ad2314
commit
588bc90008
@ -79,11 +79,8 @@ handle_conversion_error() {
|
|||||||
file_type=$(file --mime-type -b "$photo")
|
file_type=$(file --mime-type -b "$photo")
|
||||||
|
|
||||||
if [[ $file_type == image/* ]]; then
|
if [[ $file_type == image/* ]]; then
|
||||||
new_photo="${photo%.*}.jpg"
|
echo "Converting $photo to jpg using ImageMagick."
|
||||||
echo "Converting $photo to $new_photo using ImageMagick."
|
|
||||||
mogrify -format jpg "$photo"
|
mogrify -format jpg "$photo"
|
||||||
mv "${photo%.*}.jpg" "$new_photo"
|
|
||||||
rm "$photo"
|
|
||||||
else
|
else
|
||||||
echo "File is a video or unsupported type: $photo. Skipping conversion."
|
echo "File is a video or unsupported type: $photo. Skipping conversion."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user