1

i want to resize my 800x800px image into 500x1000px using libvips vipthumbnails.

we know that we can force vipthumbnail to ignore aspect ratio and do whatever dimension we want but it will simply distort the image.

resizing 800x800px image to 500x1000px will simply distort the image if we force to follow the given dimension

we simply wants to resize first to 500x500px and then on longer side add the white space in both direction equally distributed. in this case given width is 1000px so both side we will add 250px white space and align the 500x500px part in centre.

so the final image will be 500x1000px and 500x500px image with proper aspect ratio in that frame

      vipsthumbnail "/path/original.jpg" --size 500x -o "/path/resize.jpg"[Q=90]

any help will be great. i dont want to use imagemagick as it consumes more memory

jivasen
  • 43
  • 1
  • 3
  • vipsthumbnail doesn't have any modes where it pads the image with extra pixels -- it only shrinks and crops. You could do what you want with a little python / ruby / php etc. – jcupitt Jan 23 '21 at 11:47

0 Answers0