I'm just using Magick++ to convert an in memory Jpeg2000 image to a bitmap. The conversion functions correctly, but when the method returns, VStudio throws a debug assertion stating an invalid address specified for RtlValidateHeap(). Looking at the call trace, this occurs inside the CORE_DB_Magick++_.dll when calling the delete operator.
The code I'm using is pretty simple, and is below.
Code: Select all
void imageproc( void* pdata, size_t size )
{
Image image;
Blob in_b, out_b;
// initialise magick
Initializemagick( NULL );
// assign data to a blob
in_b.updateNoCopy( pdata, size );
// read the bloc data into an image object, set the new format, and write to the output blob
try {
image.read( in_b );
image.magick( "bmp" );
image.write( &out_b );
}
catch( Error& error ) {
...
return;
}
}
Thanks for any help,
Rob Smith