Imagemagick api
Posted: 2013-04-29T04:13:26-07:00
Hi,
I've just started using Imagemagick - thank you, it looks great!
I'm using an android port from here:
https://github.com/puelocesar/android-lib-magick
and I have to use the API directly, so running into some issues. Could anyone help me define the api call to correctly resize an image preserving the aspect ratio? I think I'm close, but can't find an example anywhere after much searching. Here's what I got:
img = new MagickImage(new ImageInfo(filename));
scaledImage = img.zoomImage(dimensions.getHeight(), dimensions.getWidth());
scaledImage.unsharpMaskImage(0, .75, .75, .008);
It almost works, but the aspect ratio is not preserved. I know that its fairly easily done from the command line, but having some troubles seeing the way via the api...
Thank you!
Mark
I've just started using Imagemagick - thank you, it looks great!
I'm using an android port from here:
https://github.com/puelocesar/android-lib-magick
and I have to use the API directly, so running into some issues. Could anyone help me define the api call to correctly resize an image preserving the aspect ratio? I think I'm close, but can't find an example anywhere after much searching. Here's what I got:
img = new MagickImage(new ImageInfo(filename));
scaledImage = img.zoomImage(dimensions.getHeight(), dimensions.getWidth());
scaledImage.unsharpMaskImage(0, .75, .75, .008);
It almost works, but the aspect ratio is not preserved. I know that its fairly easily done from the command line, but having some troubles seeing the way via the api...
Thank you!
Mark