J
J
jakuraji2019-03-19 20:05:01
linux
jakuraji, 2019-03-19 20:05:01

How to crop a photo on the server to keep the aspect ratio?

After uploading a photo to the server that is larger than 1000px, maybe even 4000px, you need to crop it to get a photo of different sizes - thunbnail, medium, slightly larger, etc.
The implementation language is not important. You need one that has good libraries. Or you can use Linux utilities through the command line, then any language will do.
1) How to choose the language and library? What will be the cropping algorithm? After all, you also need to consider size and orientation.
2) Or how to do it using Linux tools, or out of the box, or through popular utilities?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2019-03-19
@jakuraji

ImageMagic in any form.

K
ky0, 2019-03-19
@ky0

lmgtfy.com/?q=ffmpeg+resize+crop+images

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question