I'm currently making a imaging library for a XQuery engine, and naturally this library is heavily using ImageMagick (Magick++).
On Linux and OSX everything works fine, but on windows I get following error when using the Blob.base64(lSomeString) function:
0xC0000005: Access violation reading location 0x35f407e4
Other things work, like reading in a image and writing it out again.
I'm using cmake for generating make files and the Visual Studio compiler (as well as the Visual Studio debugger which is telling me where the Problem is) on a Windows 7 machine.
I made a small example to make sure that the problem is really there where I think it is:
Code: Select all
// A simple program that computes the square root of a number
#include <Magick++/Image.h>
#include <Magick++/Drawable.h>
#include <Magick++/Blob.h>
#include <iostream>
int main (int argc, char *argv[])
{
std::cin.get();
Magick::Blob lBlob;
lBlob.base64("R0lGODlhUAAPAKIAAAsLav///88PD9WqsYmApmZmZtZfYmdakyH5BAQUAP8ALAAAAABQAA8AAAPbWLrc/jDKSVe4OOvNu/9gqARDSRBHegyGMahqO4R0bQcjIQ8E4BMCQc930JluyGRmdAAcdiigMLVrApTYWy5FKM1IQe+Mp+L4rphz+qIOBAUYeCY4p2tGrJZeH9y79mZsawFoaIRxF3JyiYxuHiMGb5KTkpFvZj4ZbYeCiXaOiKBwnxh4fnt9e3ktgZyHhrChinONs3cFAShFF2JhvCZlG5uchYNun5eedRxMAF15XEFRXgZWWdciuM8GCmdSQ84lLQfY5R14wDB5Lyon4ubwS7jx9NcV9/j5+g4JADs=");
Magick::Image lTest(lBlob);
lTest.write("test.gif");
Magick::Image model("../t.gif" );
model.write("m.gif");
return 0;
}
Currently I am using the Binary release of ImageMagick.
Has anybody maybe got a hint to what I may be doing wrong?
Best Regards
Danny
UPDATE: Seems as if I may have been feeding false data to base64Binary, will investigate and write back if the problem persists.
UPDATE2: Problem persists even when feeding good data ...