"Only Shrink Larger" in the C api?
Posted: 2010-08-14T17:06:59-07:00
Hey,
I've noticed that `mogrify -resize 500x500> image.jpg` seems to do more than a simple:
However, I can't figure out by looking at the mogrify.c code what exactly it's doing. The flags returned by ParseMetaGeometry that include the '>' (mapped to GreaterValue?) seem to be thrown away, and, yet, the image is created in a much better fashion that the strict MagickAdaptiveResizeImage(wand, new_cols, new_rows). That is, it seems to be correctly checking the aspect, but I can't figure out where it's doing that!.
Where, exactly, is it doing that work? I'd love to use what I assume is an available API call than rewrite it myself.
I've noticed that `mogrify -resize 500x500> image.jpg` seems to do more than a simple:
Code: Select all
if (new_cols > max_col_size) {
new_cols = max_side_size;
}
if (new_rows > max_row_size) {
new_rows = max_side_size;
}
Where, exactly, is it doing that work? I'd love to use what I assume is an available API call than rewrite it myself.