0

i'm trying to open image file for an university project using the CImg library. when trying to load a png file, i get a message that the format file is not supported. after some reading, i tried to install ImageMagick++ and add it as a dependency to my Visual Studio project following this post: http://www.imagemagick.org/discourse-server/viewtopic.php?t=30295

but it still doesn't work. how do i add magick++ to my project? (even without the CImg library) is fine.

Shai
  • 1
  • Is CImg/ImageMagick required to use? I have had good success with lodepng which might be a lighter weight alternative. http://lodev.org/lodepng/ – Dan Jan 20 '18 at 15:26
  • i tried using lodepng (works great) but i also need bmp and jpg support – Shai Jan 20 '18 at 15:48
  • i also tried: #define cimg_use_magick #include "CImg.h" but this gives compilation error for undefined Magick::PixelPacket – Shai Jan 20 '18 at 17:18
  • I do not know if you can just install Imagemagick++ without all of Imagemagick. And you need to install a binary that includes the delegate libraries such as PNG, JPG, TIFF otherwise, if you install from source, you would have to manually install these delegates first. Sorry, I do not know CImg or C++. – fmw42 Jan 20 '18 at 18:07
  • i have installed the Imagemagick and marked the developer option during the installation. – Shai Jan 20 '18 at 20:29
  • Sounds like your university project is expecting ImageMagick-6. See [Porting to ImageMagick Version 7](https://www.imagemagick.org/script/porting.php). Either uninstall IM-7, and rebuild w/ IM-6, or update the project codebase. – emcconville Jan 22 '18 at 15:15
  • Just make sure you define `cimg_use_png` in your project settings then CImg can read PNG files itself. – Mark Setchell Jan 22 '18 at 21:26

0 Answers0