I just downloaded the windows install for ImageMagick 6.8.0 Q16 to see if it will meet my needs for a project i'm working on. ImageMagick is crashing whenever I try to create an image from file, or write an image to file.
Here is my code in it's simplest form:
Magick::InitializeMagick("C:\\Program Files (x86)\\ImageMagick-6.8.0-Q16");
//Magick::Image local_file_image("image.bmp");
Magick::Image local_file_image(Magick::Geometry(200,200), Magick::Color("Cyan"));
local_file_image.write("x.bmp");
If I use the commented line, it crashes there, if I create the image myself, it crashes on the write.
I've opened the button and demo projects, and I can compile them without issues, but they also crash when run. The demo program crashes on line 45 (Image model( srcdir + "model.miff" );).
I've also tried copying all the DLLs into the project's folder, and calling InitializeMagick(""), and got the same result.
Can anyone shed some light on why this is crashing?
EDIT: Just as a side note - I suspect that InitializeMagick isn't succeeding for some reason, I don't see a way to confirm it's success. I tried commenting that line out, and I get the same result, creating the image works, but writing fails, so it would seem to me that I'm not initializing it successfully, but I'm not sure why this might be.
ImageMagick API Crashing
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick API Crashing
Work it out on the command line first.
What do you get from:
1)convert -version
2) convert -list configure
(then look at the line starting with DELEGATES -- what does it list)
3) convert logo: logo.bmp
4) identify logo.bmp
What do you get from:
1)convert -version
2) convert -list configure
(then look at the line starting with DELEGATES -- what does it list)
3) convert logo: logo.bmp
4) identify logo.bmp
Re: ImageMagick API Crashing
Thanks for your reply.
All of those operations appear to work. The exe's that were installed appear to be working correctly.
The results of your instructions:
All of those operations appear to work. The exe's that were installed appear to be working correctly.
The results of your instructions:
Code: Select all
C:\Program Files (x86)\ImageMagick-6.8.0-Q16>convert -version
Version: ImageMagick 6.8.0-4 2012-10-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
C:\Program Files (x86)\ImageMagick-6.8.0-Q16>convert -list configure
Path: [built-in]
Name Value
-----------------------------------------------------------------------
NAME ImageMagick
Path: C:\Program Files (x86)\ImageMagick-6.8.0-Q16\configure.xml
Name Value
-----------------------------------------------------------------------
CC vs10
COPYRIGHT Copyright (C) 1999-2012 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
FEATURES OpenMP
HOST Windows
LIB_VERSION 0x680
LIB_VERSION_NUMBER 6,8,0,3
NAME ImageMagick
RELEASE_DATE 2012-11-01
VERSION 6.8.0
WEBSITE http://www.imagemagick.org
C:\Program Files (x86)\ImageMagick-6.8.0-Q16>convert logo: logo.bmp
C:\Program Files (x86)\ImageMagick-6.8.0-Q16>identify logo.bmp
logo.bmp BMP 640x480 640x480+0+0 8-bit sRGB 256c 52.1KB 0.000u 0:00.002
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick API Crashing
Sorry I am not a user of the IM APIs. So someone who uses them will likely have to help. Did you create an initial image object after initializing IM and before reading your bmp file? Most APIs seem to need that from what I understand.