Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageMagick: CImg.h: In member function 'cimg_library::CImg<T>& cimg_library::CImg<T>::load_magick(const char*)': #400

Open
vt-alt opened this issue Nov 5, 2023 · 0 comments

Comments

@vt-alt
Copy link

vt-alt commented Nov 5, 2023

README says GraphicsMagick is supported as well as ImageMagick. Examples using GraphicsMagick for cimg_use_magick though, which is a different library.

# Flags to enable native support of most classical image file formats, using the Magick++ library.
# ( http://www.imagemagick.org/Magick++/ )
MAGICK_DEFINE = -Dcimg_use_magick
MAGICK_INCDIR = $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(USR)/$(INCLUDE)/GraphicsMagick)
MAGICK_CFLAGS = $(MAGICK_DEFINE) $(MAGICK_INCDIR)
MAGICK_LIBS = $(shell pkg-config --libs GraphicsMagick++ || echo -lGraphicsMagick++)

Compiling for ImageMagick produces errors. Compile flags:

CXXFLAGS="-Dcimg_use_magick $(pkg-config --cflags Magick++)"
LDLIBS="$(pkg-config --libs Magick++)"

Errors:

+ make -j20 -C src 'CXXFLAGS=-pipe -frecord-gcc-switches -Wall -fdiagnostics-color=always -fdiagnostics-color=always -g -O2 -flto=auto  -D__POSIX_VERSION -Dcimg_use_magick -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7' 'LDLIBS=-lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI'
make: Entering directory '/usr/src/RPM/BUILD/tiv-1.2/src'
g++ -pipe -frecord-gcc-switches -Wall -fdiagnostics-color=always -fdiagnostics-color=always -g -O2 -flto=auto  -D__POSIX_VERSION -Dcimg_use_magick -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -std=c++20 -Wall -fexceptions   -c -o tiv.o tiv.cpp
In file included from tiv.cpp:47:
CImg.h: In member function 'cimg_library::CImg<T>& cimg_library::CImg<T>::load_magick(const char*)':
CImg.h:54835:20: error: 'PaletteMatteType' is not a member of 'Magick'; did you mean 'PaletteType'?
54835 |       case Magick::PaletteMatteType :
      |                    ^~~~~~~~~~~~~~~~
      |                    PaletteType
CImg.h:54836:20: error: 'TrueColorMatteType' is not a member of 'Magick'; did you mean 'TrueColorType'?
54836 |       case Magick::TrueColorMatteType :
      |                    ^~~~~~~~~~~~~~~~~~
      |                    TrueColorType
CImg.h:54840:17: error: 'PixelPacket' is not a member of 'Magick'; did you mean 'PixelMask'?
54840 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                 ^~~~~~~~~~~
      |                 PixelMask
CImg.h:54840:30: error: 'pixels' was not declared in this scope
54840 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                              ^~~~~~
CImg.h:54853:17: error: 'PixelPacket' is not a member of 'Magick'; did you mean 'PixelMask'?
54853 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                 ^~~~~~~~~~~
      |                 PixelMask
CImg.h:54853:30: error: 'pixels' was not declared in this scope
54853 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                              ^~~~~~
CImg.h:54861:20: error: 'GrayscaleMatteType' is not a member of 'Magick'; did you mean 'GrayscaleType'?
54861 |       case Magick::GrayscaleMatteType : {
      |                    ^~~~~~~~~~~~~~~~~~
      |                    GrayscaleType
CImg.h:54864:17: error: 'PixelPacket' is not a member of 'Magick'; did you mean 'PixelMask'?
54864 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                 ^~~~~~~~~~~
      |                 PixelMask
CImg.h:54864:30: error: 'pixels' was not declared in this scope
54864 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                              ^~~~~~
CImg.h:54874:17: error: 'PixelPacket' is not a member of 'Magick'; did you mean 'PixelMask'?
54874 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                 ^~~~~~~~~~~
      |                 PixelMask
CImg.h:54874:30: error: 'pixels' was not declared in this scope
54874 |         Magick::PixelPacket *pixels = image.getPixels(0,0,W,H);
      |                              ^~~~~~
CImg.h: In member function 'const cimg_library::CImg<T>& cimg_library::CImg<T>::save_magick(const char*, unsigned int) const':
CImg.h:59258:15: error: 'PixelPacket' is not a member of 'Magick'; did you mean 'PixelMask'?
59258 |       Magick::PixelPacket *pixels = image.getPixels(0,0,_width,_height);
      |               ^~~~~~~~~~~
      |               PixelMask
CImg.h:59258:28: error: 'pixels' was not declared in this scope
59258 |       Magick::PixelPacket *pixels = image.getPixels(0,0,_width,_height);
      |                            ^~~~~~
make: *** [<builtin>: tiv.o] Error 1

Note about their independence on http://www.graphicsmagick.org/

GraphicsMagick is originally derived from ImageMagick 5.5.2 as of November 2002 but has been completely independent of the ImageMagick project since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant