[ SOLVED ] ImageMagick 6.7.9-3 Cannot Resize
Posted: 2012-09-10T14:59:26-07:00
Hello everyone! Im using the lastest version of ImageMagick (6.7.9-3) with Magick++, I compiled my self (Debian Wheezy Kernel 3.2.21):
I'm developing an application in C++ for resizing and throws me an error I can not solve:
This is a portion of my code:
Then the aplication is compiled with this:
The program runs OK until the o_ImageMagick.resize( newSize ); Then hangs and throws this error:
And some times it only says Segmentation Fault
Thanks in advance!
Martin!
Code: Select all
./configure --prefix=/opt/imagemagick
This is a portion of my code:
Code: Select all
try
{
try
{
// Try reading image file
o_ImageMagick.read( m_strSourcePath );
}
catch( Magick::WarningCoder &warning )
{
// Magick++ warning.
cerr << "Coder Warning: " << warning.what() << endl;
}
catch( Magick::Warning &warning )
{
// Other Magick++ warning.
cerr << "Warning: " << warning.what() << endl;
}
catch( Magick::ErrorFileOpen &error )
{
// Magick++ file open error
cerr << "Error: " << error.what() << endl;
}
try
{
o_ImageMagick.resize( newSize ); //Program Hangs HERE!
o_ImageMagick.type( TrueColorType );
if( m_dRotate != 0 ) o_ImageMagick.rotate( m_dRotate );
o_ImageMagick.write( m_strOutputPath );
}
catch( Magick::Exception & error)
{
cerr << "Magick++ exception: " << error.what() << endl;
}
}
catch( std::exception &error )
{
// Standard C++ exception
cerr << "STD exception: " << error.what() << endl;
}
catch( ... )
{
// Process other exceptions
}
Code: Select all
g++-4.7 -ggdb -Wall -O2 -o ImageConvert -fopenmp -I/opt/imagemagick/include/ImageMagick -lMagick++ -lMagickCore ... etc
Code: Select all
ImageConvert: magick/cache-view.c:729: GetCacheViewVirtualPixels: Assertion `id < (int) cache_view->number_threads' failed.
Thanks in advance!
Martin!