SIGBART when calling image.geometry

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
jupiter
Posts: 28
Joined: 2011-11-17T07:45:55-07:00
Authentication code: 8675308

SIGBART when calling image.geometry

Post by jupiter »

Hi

when ever i try to access the geometry with following code:

#include <Magick++.h>
#include <Magick++/Geometry.h>

Code: Select all

 
void function() {
Image image( "100x100", "white" );
    image.read("test.jpg");
    Magick::Geometry geo = image.geometry();
    MagickCore::ExceptionInfo exceptionInfo;
    MagickCore::GetExceptionInfo( &exceptionInfo );
    MagickCore::ShadowImage(image.image(), 5, 5, 200, 200 , &exceptionInfo);
    image.write( "test123.jpg" );
}
i recieve a SIGBART crash when calling image.geometry()

what am i doing wrong?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: SIGBART when calling image.geometry

Post by magick »

What is your OS, compiler, compiler version? It looks like your program is not handling exceptions properly. It should report:
  • terminate called after throwing an instance of 'Magick::WarningOption'
    what(): Magick: Image does not contain a geometry
    Abort
Fix by specifying a geometry before you call image.geometry(). For examples, grab the ImageMagick source distribution and look in the ImageMagick-6.7.3-6/Magick++/demo or test folders.
jupiter
Posts: 28
Joined: 2011-11-17T07:45:55-07:00
Authentication code: 8675308

Re: SIGBART when calling image.geometry

Post by jupiter »

I'm on mac osx lion with gcc 4.2.1
Post Reply