Answer the question
In order to leave comments, you need to log in
Scaling and cropping images to given dimensions?
In the Apple Store, movie posters have the same width and height. Accordingly, everything looks good. But finding the same posters is not so easy. They differ in size, especially in older films.
The question is. Do they adjust each poster with pens so as not to cut anything necessary, or is there some kind of algorithm?
Thank you in advance for the links to the material, algorithms and comments.
Answer the question
In order to leave comments, you need to log in
There is an Open Source image-processing library rich in ImageMagick , among others it has a console program convert , which allows you to perform a huge number of transformations with images (there are examples on the Internet how to use it to repeat Photoshop effects).
For batch processing, you can write a script (for example, in bash) that scans all files in a folder, and then performs actions for each through convert.
Here is a nice page with convert -resize examples .
An example of converting the original image to a size of 500x500 px:
convert in.jpg -resize 500x500\! out.jpg
There is such a thing phpThumb
Here is an example of a site with it: example
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question