I
I
Igor2016-03-22 08:13:15
PHP
Igor, 2016-03-22 08:13:15

How to make phpthumb not stretch the image?

For example, the original image is 60x60 pixels. We generate previews 120x120. It is necessary that this image be the original size (without enlargement) in the center and a white background is added around.
Right now I'm using the following settings:

[{"w":120,"h":120,"q":90,"zc":"0","aoe":"0","bg":"ffffff"}]

Original: 4c0cd1dfd2d84a4eb2cffd674e5c85a8.jpg
What you get: 50e7d09ab03d484cbbd5ba0686149d81.jpg
What you need to get:94faf889cbfc4a9598b64fd23d32462d.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
photozoom, 2016-04-23
@photozoom

the zoom-crop parameter must be equal to 1, in your case zc":"1"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question