No resize() only sample() and scale()? [Magick++]

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mankyd

No resize() only sample() and scale()? [Magick++]

Post by mankyd » 2006-06-22T12:40:59-07:00

Looking at the Magick++ documentation (here), I see no mention of a resize() function. The exception is that it is referenced in the notes of the filterType property (here.) Am I missing something?

I've been using sample to scale my images down and have not been impressed with the results. While we're on the subject, can someone explain to me the difference between sample() and what would be resize()?

User avatar
magick
Site Admin
Posts: 10918
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-06-22T14:04:45-07:00

Use zoom(). Its an alias for resizing an image. Sampling samples an image and does not introduce any additionals colors into the image. Resizing uses an image filter and does introduce new colors into the image and generally does a better job than sampling.
Last edited by magick on 2006-06-22T17:23:24-07:00, edited 1 time in total.

mankyd

Post by mankyd » 2006-06-22T17:21:58-07:00

Thanks! That did it for me. Perhaps the fact the zoom effectively == resize can be mentioned in the documentation somewhere?

User avatar
magick
Site Admin
Posts: 10918
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-06-22T17:23:50-07:00

We took the easy way out and added resize() to Magick++ for the next point release.

User avatar
magick
Site Admin
Posts: 10918
Joined: 2003-05-31T11:32:55-07:00

Re: No resize() only sample() and scale()? [Magick++]

Post by magick » 2007-02-21T08:54:05-07:00

The source to the complete ImageMagick distribution is available from the home page, http://www.imagemagick.org. The resizing algorithms are in the ImageMagick-6.3.2/magick/resize.c source module.

Post Reply