Hey, I was wondering if someone knows a good way to scale an image whi开发者_如何学JAVAle 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.
精彩评论