first-chance/unhandled exception, magick::errorblob

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
tunog_alyn21

first-chance/unhandled exception, magick::errorblob

Post by tunog_alyn21 »

i get this message error

Code: Select all

First-chance exception at 0x7705b09e in imagemagick_qt.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..
Unhandled exception at 0x7705b09e in imagemagick_qt.exe: Microsoft C++ exception: Magick::ErrorBlob at memory location 0x0012b288..
this is my code (im using Qt4 btw).

Code: Select all

	QPixmap pix;
   QString fileName = QFileDialog::getOpenFileName(this,
                                    tr("Open File"), QDir::currentPath());
	if (!fileName.isEmpty()) {
   	// Read file from disk
		Image image;
		image.read( fileName.toStdString() ); //debugger points here
	 
	   // Write to some BLOB in XPM format
	   Blob blob;
	   image.magick( "XPM" ); // Set XPM
	   image.write( &blob );
		
		// Passing Image Buffer to a QPixmap
		const QByteArray imgData ((char*)(blob.data()));
		pix.loadFromData(imgData);

		// Setting the QPixmap
		imageLabel->setPixmap(pix);
i've no idea why this error occurs. any help is much appreciated! :(
manojmka

Re: first-chance/unhandled exception, magick::errorblob

Post by manojmka »

Did you find a solution to this?
jstoezel

Re: first-chance/unhandled exception, magick::errorblob

Post by jstoezel »

Sorry, moved this post in another discussion
Post Reply