Page 1 of 1

Resize returns blank images

Posted: 2012-08-27T22:51:28-07:00
by Junior Mage
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?

Re: Resize returns blank images

Posted: 2012-09-12T06:28:00-07:00
by Junior Mage
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 ) );