Closed undrwater closed 5 years ago
In master
ImageMagick is included as an submodule, so you should do a git submodule update --init
if you run build-magick.sh
, you don't need to build the included ImageMagick if your system has ImageMagick 7.0.8-29+, but note that I only test against that version.
Note that master
is not stable in any way.
In 1.2
I would recommend using qmake
, there you can specify the Magick++ pkg-config .pc file using MAGICK_CONFIG=<whatever>
. ImageMagick 6 Q32HDRI is the only version supported. I can add support for ImageMagick 7 (if the unit tests agree) if wanted.
The 1.2 branch now supports IM7 (cmake and qmake).
I got closer, but now I failed at
make test
`Running tests...
Test project /root/cyan/build
Start 1: tests
1/1 Test #1: tests ............................***Failed 1.29 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 1.29 sec
The following tests FAILED: 1 - tests (Failed) Errors while running CTest make: *** [Makefile:119: test] Error 8`
However:
make Cyan
does work and I can run it. So...thanks!
Failed tests is bad. Can you run the tests
file in the build directory to find out where it breaks?
Failed tests is bad. Can you run the
tests
file in the build directory to find out where it breaks?
./tests ********* Start testing of Cyan ********* Config: Using QtTest library 5.12.5, Qt 5.12.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.2.0) PASS : Cyan::initTestCase() QDEBUG : Cyan::test_case1() Loading original sample image ... QDEBUG : Cyan::test_case1() Extract embedded color profile from sample image ... QDEBUG : Cyan::test_case1() tests: Unknown field with tag 42240 (0xa500) encountered.
TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/1017
QDEBUG : Cyan::test_case1() Loading CMYK sample image ...
QDEBUG : Cyan::test_case1() Loading GRAY sample image ...
QDEBUG : Cyan::test_case1() Loading RGB sample profile ...
QDEBUG : Cyan::test_case1() Loading CMYK sample profile ...
QDEBUG : Cyan::test_case1() Loading GRAY sample profile ...
PASS : Cyan::test_case1()
QDEBUG : Cyan::test_case2() Checking for JPEG support ...
QDEBUG : Cyan::test_case2() Checking for PNG support ...
QDEBUG : Cyan::test_case2() Checking for TIFF support ...
QDEBUG : Cyan::test_case2() Checking for LCMS support ...
QDEBUG : Cyan::test_case2() Checking for HDRI support ...
FAIL! : Cyan::test_case2() 'fx.hasHDRI()' returned FALSE. ()
Loc: [/root/cyan/src/tst_cyan.cpp(202)]
QDEBUG : Cyan::test_case3() Checking profiles color space ...
QDEBUG : Cyan::test_case3() Checking profiles tags ...
PASS : Cyan::test_case3()
QDEBUG : Cyan::test_case4() Converting RGB to CMYK ...
FAIL! : Cyan::test_case4() 'compareImages(sampleCMYK, resultCMYK.imageBuffer)' returned FALSE. ()
Loc: [/root/cyan/src/tst_cyan.cpp(255)]
PASS : Cyan::cleanupTestCase()
Totals: 4 passed, 2 failed, 0 skipped, 0 blacklisted, 1269ms
Finished testing of Cyan `
HDRI in ImageMagick is needed.
How is ImageMagick built? magick --version
you are correct, I did not have HDRI enabled. Here's how it looks in gentoo:
media-gfx/imagemagick-7.0.8.64:0/7.0.8.64::gentoo USE="X bzip2 corefonts cxx fontconfig jpeg lcms openmp pango png postscript svg tiff truetype xml zlib -djvu -fftw -fpx -graphviz -hdri -heif -jbig -jpeg2k -lqr -lzma -opencl -openexr -perl -q32 -q8 -raw -static-libs -test -webp -wmf" 0 KiB
Also note that -q8
probably overrides -q32
. 16 is a minimum requirement.
Do you recommend building with q32?
Up to you, the quantum depth in ImageMagick defines the supported bit depth in Cyan (and performance). I would recommend Q16HDRI.
I'm attempting to clone from git on a Gentoo system. At the first instruction:
MKJOBS=4 STATIC=1 sh share/scripts/build-magick.sh
I get:
==> Building ImageMagick MAGICK=7.0.8-29 QUANTUM=16 MKJOBS=4 STATIC=1 REBUILD=0 ... share/scripts/build-magick.sh: line 54: ./configure: No such file or directory
This pull is from the master branch.
Cloning 1.2 I get:
mkdir build && cd build cmake ..
-- Checking for one of the modules 'ImageMagick++' CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:696 (message): None of the required 'ImageMagick++' found Call Stack (most recent call first): CMakeLists.txt:103 (pkg_search_module)
From a gentoo bug post, ImageMagick++ is changed to Magick++ in pkgconfig: bug.
I could get around this by creating a symbolic link to Magick++. After this, I get:
[ 52%] Building CXX object CMakeFiles/Cyan.dir/src/FXX.cpp.o /root/cyan/src/FXX.cpp: In static member function ‘static int FXX::readImageChannelCount(Magick::Image)’: /root/cyan/src/FXX.cpp:399:22: error: ‘class Magick::Image’ has no member named ‘matte’ 399 | && (image.matte() != Magick::MagickFalse)) channels++; | ^~~~~ make[2]: *** [CMakeFiles/Cyan.dir/build.make:191: CMakeFiles/Cyan.dir/src/FXX.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/Cyan.dir/all] Error 2 make: *** [Makefile:141: all] Error 2
Looking around, this is a problem that occurs when building against imagemagick v7.Hope this helps.