Resizing and cropping at the same time

Hi all,
I would like to be able to crop and resize an image at the same time: let’s say I had a 1600900 image and I wanted to resize and crop it to fit into a 450450 box.
As far as I understand, I could only crop it OR resize it, but I couldn’t do both the things at once (that is: resizing it to 800450 and cropping it to 450450). My only alternative is resizing, the adapting frontend-side. This way I have a useless overhead for a part of image which will never be shown.
Do you have any other approaches?

I think what you’re looking for is the “fit” parameter:

From what you describe it sounds like you need “crop”:

Hi, thanks for the reply.
At last, I found the solution by myself (sorry for not having time to notify): it’s fit=thumb.
crop doesn’t allow to resize AND crop at the same time (it just crops), while thumb does.
A couple of problems: 1) f parameter doesn’t allow a precise focus position, but the problem is tracked here 2) I’d prefer being able to resize the whole image to a certain size, aspect ratio, etc, THEN cropping it

Sorry, wrong command. “Fill” is the one you want.

w=450&h=450&fit=fill should do exactly what you described in the first post.

First the image is scaled down so the shortest side is 450 pixels, then the other side is cropped down to 450 pixels.

I’m afraid I don’t know the difference between thumb and fill :slight_smile: Could you please help me?
I can’t find an example where they behave differently, and both can do my job (point one apart).

The desiderata would be another option allowing to - for instance - resizing a 10001000 image to 350400, THEN, in the resulting image, cropping an internal box, let’s say from 120,50 to 270,350.

by cropping, I’d just crop the image, while by thumb or filling, as you said, I’d have a full-width letterboxed image or a full-height letterboxed one.