Error while retrieving image's width / height
Posted: 2008-06-30T11:48:16-07:00
Hello,
I only need imagemagick to load/save image files.
The annoying code snippet is simple :
Everything compiles well, but at the execution i've got this message :
Unhandled exception at 0x7c342eee in xxx.exe: 0xC0000005: Access violation reading location 0xcccccccc.
Then i have tried in an other way :
But that doesn't change anything, the error message is still popped...
The geometry seems not to be well set at image loading, the behavior is like dealing with an uninitialized pointer.
Any idea please, i've spent all the day on this !
(I have also tried to use magick++ through the "cool image" library : the problem is still present but apprears a little bit before : during construction "Magick::Image image(filename);" at line 26812 in CImg.h)
I only need imagemagick to load/save image files.
The annoying code snippet is simple :
Code: Select all
Magick::Image tmpImage;
try
{
tmpImage.read (path);
unsigned int width = tmpImage.columns();
...
Unhandled exception at 0x7c342eee in xxx.exe: 0xC0000005: Access violation reading location 0xcccccccc.
Then i have tried in an other way :
Code: Select all
Magick::Image tmpImage;
try
{
tmpImage.read (path);
Magick::Geometry tmpImageGeometry = tmpImage.size();
unsigned int width = tmpImageGeometry.width();
...
The geometry seems not to be well set at image loading, the behavior is like dealing with an uninitialized pointer.
Any idea please, i've spent all the day on this !
(I have also tried to use magick++ through the "cool image" library : the problem is still present but apprears a little bit before : during construction "Magick::Image image(filename);" at line 26812 in CImg.h)