Stability Update 4.
Change the dynamic scaling of images to static. (Prevents bugs.)
This commit is contained in:
parent
cd89f092e3
commit
0f7b027ac8
1 changed files with 5 additions and 15 deletions
|
@ -17,19 +17,9 @@ ls -1v img/* | while IFS= read -r file; do
|
||||||
done > concat.txt
|
done > concat.txt
|
||||||
sed -i '/\\/d' concat.txt
|
sed -i '/\\/d' concat.txt
|
||||||
|
|
||||||
# Resize images in img folder to multiple of 2.
|
# Resize images in img folder to 4k.
|
||||||
|
|
||||||
for image in img/*; do
|
for image in img/*; do
|
||||||
# Use identify to get the width and height of the image
|
# Resize the image to 4k.
|
||||||
width=$(identify -format "%w" "$image")
|
convert "$image" -resize "3840x2160" "$image"
|
||||||
height=$(identify -format "%h" "$image")
|
echo "Resized $image to 3840x2160"
|
||||||
|
|
||||||
# Calculate the nearest multiple of 2 for width and height
|
|
||||||
new_width=$((width + (2 - (width % 2)) % 2))
|
|
||||||
new_height=$((height + (2 - (height % 2)) % 2))
|
|
||||||
|
|
||||||
# Resize the image to the nearest multiple of 2
|
|
||||||
convert "$image" -resize "${new_width}x${new_height}" "$image"
|
|
||||||
|
|
||||||
echo "Resized $image to ${new_width}x${new_height}"
|
|
||||||
done
|
done
|
Loading…
Reference in a new issue