Resize returns blank images

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
Junior Mage
Posts: 2
Joined: 2012-08-27T21:42:55-07:00
Authentication code: 67789

Resize returns blank images

Post by Junior Mage » 2012-08-27T22:51:28-07:00

Greetings,

Right to it, I've a problem with ImageMagick returning blank (all black, full opacity) images on any resize operation (except for resizing an image to the current size for which Magick::Image::resize() is never called) for a current project of mine. I've tried the following combinations of platforms and Qt and ImageMagick versions:

Fedora 17 with Qt 4.8.2 and IM 6.7.5.6-3 (From repo) and 6.7.9-0 (From source)
Fedora 15 with Qt 4.7.4 and IM 6.7.? (From repo)
Windows 7 with Qt 4.8.2 and IM 6.7.9-0 (From source)

Before including ImageMagick with the aforementioned project, I threw together a simple test application to load and resize images for a given filter. In this application, ImageMagick works perfectly. Testing everything line by line, I've found the problem lies somewhere within Magick::Image::resize(). No exceptions are thrown and no failed assertions are encountered. The same few images are being tested. Under what conditions does resize return a blank image?

Junior Mage
Posts: 2
Joined: 2012-08-27T21:42:55-07:00
Authentication code: 67789

Re: Resize returns blank images

Post by Junior Mage » 2012-09-12T06:28:00-07:00

Solved.

Replaced:

Code: Select all

Magick::Image *mage = new Magick::Image( Magick::Geometry( width , height ) , Magick::Color( 0 , 0 , 0 , 255 ) );
With:

Code: Select all

Magick::Image *mage = new Magick::Image();
mage->size( Magick::Geometry( width , height ) );

Post Reply