Hi,
I've tried Image::sample() and Image::resize() images to a smaller size by specifying geometries like "1440x720!" or just "1440x720" ) and I very often get a pixel or two shaved off the resulting height or width ( but never both ) of the resulting image. What is the proper way to do this?
As always, thanks!
-- Bob
Resize without preserving aspect ratio in Magick++
-
- Posts: 31
- Joined: 2007-11-23T15:34:51-07:00
-
- Posts: 31
- Joined: 2007-11-23T15:34:51-07:00
Re: Resize without preserving aspect ratio in Magick++
The issue, as it turns out, is that creating a Geometry object using "800x600!" e.g.
does not set the aspect flag in the object. To get it to work I needed to use
to get subsequent Image::resize( output ) to work as I needed. Isn't the exclam supposed to do this, or is this working as designed?
-- Bob
Code: Select all
Geometry output = "800x600!";
Code: Select all
output.aspect( TRUE );
-- Bob