Skip to content

Commit

Permalink
Fix #2 - allow for spaces in file names
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpurdue committed Jan 25, 2022
1 parent be92593 commit 5d86aca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions instascale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ do
echo "Working on $image"

# Get the dimensions of the original image
old_width=$(magick identify -format "%[fx:w]" $image)
old_height=$(magick identify -format "%[fx:h]" $image)
old_width=$(magick identify -format "%[fx:w]" "$image")
old_height=$(magick identify -format "%[fx:h]" "$image")

# Calculate the dimentions of the new image
new_width=1080
Expand All @@ -51,5 +51,5 @@ do
fi

# Resize the image
magick $image -resize ${new_width}x${new_height} -background white -compose Copy -gravity center -extent ${new_width}x${new_height} -quality 90 Instagram/$image
magick "$image" -resize ${new_width}x${new_height} -background white -compose Copy -gravity center -extent ${new_width}x${new_height} -quality 90 "Instagram/$image"
done

0 comments on commit 5d86aca

Please sign in to comment.