JonasKruckenberg / imagetools

Load and transform images using a toolbox :toolbox: of custom import directives!
MIT License
954 stars 59 forks source link

crop from / "gravity" #701

Closed leoj3n closed 8 months ago

leoj3n commented 8 months ago

I need to be able to specify where the aspect ratio cropping happens on the image.

You might consider allowing something like:

Compass-style directions represent a location in the image. For example, g_north_east represents the top right corner, whereas g_south_west designates the bottom-left corner.

https://cloudinary.com/documentation/gravity_transformations_tutorial#:~:text=What%20is%20gravity%2Dspecific%20cropping%3F,-0%3A07&text=By%20applying%20the%20gravity%20transformation,or%20padding%20options%20are%20applied.

AFAICT this is not supported currently.

leoj3n commented 8 months ago

https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md#position