Resize image with mogrify without keeping aspect ratio

After another half hour of searching I have stumbled upon the overly simple answer. The following will resize an image with the exact dimensions given: mogrify input.png -resize 256×256! output.png If you want to read more about it, I got the answer from this link: https://superuser.com/questions/212752/how-to-stretch-an-image-in-one-dimension

Batch resize images and output images to new folder with ImageMagick

“Mogrify” should be called from the directory with the original thumbnails, while the -path parameter is for pointing target directory. mkdir public_html/images/new-thumbs cd public_html/images/thumbs magick mogrify -resize 16×12 -quality 100 -path ../new-thumbs *.jpg http://www.imagemagick.org/Usage/basics/#mogrify The last arguments are the list of files, so you can filter by name 1-*.jpg for example.

Hata!: SQLSTATE[08004] [1040] Too many connections