Page 1 of 1
valid arguments for the magick() function?
Posted: 2006-08-18T10:46:55-07:00
by sanderton
Hello!
I've been looking for a list of valid arguments for the magick() function (C++ API). The Image documentation gives "GIF" as an example, and some of the example code has "RGBA". I've also stepped into the code but I just can't seem to find a list or range; I must be missing something!
Could someone point me in the right direction?
Thanks,
sanderton
Posted: 2006-08-18T10:59:12-07:00
by magick
format "BMP" not recognized
Posted: 2006-08-18T11:30:21-07:00
by sanderton
Thanks, that's exactly what I've been looking for!
I just have a little problem with some code I've written; I'm getting an exception, "ImageMagick: Unrecognized image format (BMP)".
Code: Select all
Magick::Geometry dims( nCols, nRows );
Magick::Image IMAlpha;
IMAlpha.size( dims );
for ( int j = 0; j < nRows; j++ )
{
// ...writing pixel by pixel, the alpha bits from another image
}
IMAlpha.magick( "BMP" );
I also tried calling magick() before the for-loop but had the same result. I'm really puzzled because I've used the same code elsewhere and had no problem; the only difference is that I was using other image formats like "TIFF", "JPEG", "PNG", etc.
Any insight would be really appreciated.
Thanks again,
sanderton
Posted: 2006-08-18T11:41:52-07:00
by magick
We would need a small working program that reproduces the problem before we could help other than say the exception you are getting is thrown if ping() is called with a NULL in-memory image.
example using magick()
Posted: 2006-08-18T12:37:51-07:00
by sanderton
I based my code:
Code: Select all
Magick::Geometry dims( nCols, nRows );
Magick::Image IMAlpha;
IMAlpha.size( dims );
IMAlpha.magick( "BMP" );
on the following sample from the Image documentation, Blob section:
Code: Select all
Blob blob( data, length );
Image image;
image.size( "640x480")
image.magick( "RGBA" );
image.read( blob);
I can't see any real difference.
BMP decode delegate missing
Posted: 2006-08-18T14:03:47-07:00
by sanderton
OK, I finally found out what's happening. When I debugged down into the IM code I found an exception in IsMagickConflict():
UnableToOpenModuleFile `C:\...\IM_MOD_DB_BMP_.dll': No such file or directory
So, a missing DLL! This exception info doesn't seem to be propagated up the calling stack and another message is output, which is why I was confused!
Cheers!
sanderton