I
I
invox592014-03-11 15:55:05
PHP
invox59, 2014-03-11 15:55:05

How to create thumbnail images of given size?

You need to create an image gallery. When creating thumbnails in the standard way

<img src="/image/data/gallery/1.jpg" style="height: 100px; width: 100px;" />
a 100*100 square is created, into which the whole image fits, distorting vertically or horizontally depending on the orientation. What can I do to crop the image with a square in the center and display it in the specified dimensions? Maybe there are programs that do such a resize? I would be grateful for any solution.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Litvinov, 2014-03-11
@Sander_Li

In php it is usually implemented via GD or ImageMagic
Related question

M
Mikhail Osher, 2014-03-11
@miraage

phpthumb.sourceforge.net

I
Ivan Naumov, 2014-03-12
@ivannaymov

artkiev.com/blog/css-image-crop-resize.htm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question