2

Hey, I was wondering if someone knows a good way to scale an image while maintaining aspect ratio, and then center it with respect to a specified fixed crop area.

The first part is straight forward (resizing while maintaining ratio), just need help with the second part.

Here is a link to something that does this with php and image gd.. PHP crop image to fix width and height without losing dimension ratio

Another link to what I want to achieve is the "Crop" strategy on this page: http://transloadit.com/docs/image-resize#resize-strategies

I want to do this using the graphicsmagick C library.

Thanks a lot.

Community
  • 1
  • 1
Emmanuel P
  • 185
  • 1
  • 2
  • 8

0 Answers0