How can I Center an image within a fixed specified crop frame with graphicsmagick C library <p>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.</p> <p>The first part is straight forward (resizing while maintaining ratio), just need help with the second part. </p> <p>Here is a link to something that does this with php and image gd.. <a href="http://stackoverflow.com/questions/3255773/php-crop-image-to-fix-width-and-height-without-losing-dimension-ratio">PHP crop image to fix width and height without losing dimension ratio</a></p> <p>Another link to what I want to achieve is the "Crop" strategy on this page: <a href="http://transloadit.com/docs/image-resize#resize-strategies" rel="nofollow">http://transloadit.com/docs/image-resize#resize-strategies</a></p> <p>I want to do this using the graphicsmagick C library.</p> <p>Thanks a lot.</p>