problems with Magick::Pixels
Re: problems with Magick::Pixels
Good idea, thanks. I will check that. I am new to Mac/Linux, so maybe I did something wrong when installing ImageMagick. What I need in the end is a multi platform configuration.
Background is that I rewrite my App to work with Windows and Mac, using a Qt interface. Image processing and ImageMagick are in a separate shared library, using CMake. Maybe the lib path is pointing to a macports installation of ImageMagick, which I don‘t need anyway, so maybe the first step is to remove it.
Background is that I rewrite my App to work with Windows and Mac, using a Qt interface. Image processing and ImageMagick are in a separate shared library, using CMake. Maybe the lib path is pointing to a macports installation of ImageMagick, which I don‘t need anyway, so maybe the first step is to remove it.
Re: problems with Magick::Pixels
Good idea, thanks. I will check that. I am new to Mac/Linux, so maybe I did something wrong when installing ImageMagick. What I need in the end is a multi platform configuration.
Background is that I rewrite my App to work with Windows and Mac, using a Qt interface. But image processing and ImageMagick are in a separate shared library, using CMake. Maybe the lib path is pointing to a macports installation of ImageMagick, which I don‘t need anyway, so maybe the first step is to remove it.
Background is that I rewrite my App to work with Windows and Mac, using a Qt interface. But image processing and ImageMagick are in a separate shared library, using CMake. Maybe the lib path is pointing to a macports installation of ImageMagick, which I don‘t need anyway, so maybe the first step is to remove it.
Re: problems with Magick::Pixels
Ah this forum uses pages. Sorry for double posting, I was missing my post but then I realized it is not on the first page
Re: problems with Magick::Pixels
The CMake configuration I use for ImageMagick is:
So at least I use the same base directory, which I retrieved from the git repo:
I'm sorry for posting the output of my macports installation, which caused severe conflicts with brew on my Mac, I have to get rid of it somehow. But it is not influencing my build as you see above. To build it from my git clone, I executed:
So as you explained, this created a library that uses float as Quantum, though the headers use uint16_t. How can I make sure that the dylib and the headers are consistent?
Code: Select all
set(IMAGEMAGICK_DIR ${CMAKE_BINARY_DIR}/../../ImageMagick)
include_directories(${IMAGEMAGICK_DIR}/Magick++/lib ${CMAKE_BINARY_DIR}/../../ImageMagick)
target_link_libraries(StratonImageProcessing ${IMAGEMAGICK_DIR}/Magick++/lib/.libs/libMagick++-7.Q16HDRI.3.dylib)
Code: Select all
origin https://github.com/ImageMagick/ImageMagick.git (fetch)
origin https://github.com/ImageMagick/ImageMagick.git (push)
Code: Select all
./configure --prefix=/opt --with-quantum-depth=16 --disable-dependency-tracking --without-perl
make
sudo make install
Re: problems with Magick::Pixels
maybe I should add that after the build, I have just the HDRI dylib in the output folder, no alternative:
Code: Select all
~/git/ImageMagick/Magick++/lib/.libs> ls -l
total 22360
-rw-r--r-- 1 stefan staff 118528 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Blob.o
-rw-r--r-- 1 stefan staff 105748 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-BlobRef.o
-rw-r--r-- 1 stefan staff 117768 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-CoderInfo.o
-rw-r--r-- 1 stefan staff 254076 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Color.o
-rw-r--r-- 1 stefan staff 930828 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Drawable.o
-rw-r--r-- 1 stefan staff 532520 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Exception.o
-rw-r--r-- 1 stefan staff 102840 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Functions.o
-rw-r--r-- 1 stefan staff 168396 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Geometry.o
-rw-r--r-- 1 stefan staff 895724 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Image.o
-rw-r--r-- 1 stefan staff 127860 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-ImageRef.o
-rw-r--r-- 1 stefan staff 137748 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Montage.o
-rw-r--r-- 1 stefan staff 197444 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Options.o
-rw-r--r-- 1 stefan staff 237788 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Pixels.o
-rw-r--r-- 1 stefan staff 68544 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-ResourceLimits.o
-rw-r--r-- 1 stefan staff 533068 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-STL.o
-rw-r--r-- 1 stefan staff 453940 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Statistic.o
-rw-r--r-- 1 stefan staff 76608 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-Thread.o
-rw-r--r-- 1 stefan staff 65780 29 Aug 22:44 Magick___lib_libMagick___7_Q16HDRI_la-TypeMetric.o
-rwxr-xr-x 1 stefan staff 967776 29 Aug 22:44 libMagick++-7.Q16HDRI.3.dylib
-rw-r--r-- 1 stefan staff 5293088 29 Aug 22:44 libMagick++-7.Q16HDRI.a
lrwxr-xr-x 1 stefan staff 29 29 Aug 22:44 libMagick++-7.Q16HDRI.dylib -> libMagick++-7.Q16HDRI.3.dylib
lrwxr-xr-x 1 stefan staff 27 29 Aug 22:44 libMagick++-7.Q16HDRI.la -> ../libMagick++-7.Q16HDRI.la
-rw-r--r-- 1 stefan staff 1554 29 Aug 22:44 libMagick++-7.Q16HDRI.lai
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: problems with Magick::Pixels
Something like this:Straton wrote:How can I make sure that the dylib and the headers are consistent?
Code: Select all
#if defined(MAGICKCORE_HDRI_SUPPORT)
printf ("Header says we have HDRI\n");
#else
printf ("Header says we have integer, not HDRI\n");
#endif
printf ("Library says features are: %s\n", GetMagickFeatures());
snibgo's IM pages: im.snibgo.com
Re: problems with Magick::Pixels
Code: Select all
Debugging starts
Header says we have integer, not HDRI
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: problems with Magick::Pixels
For me, it is a ./configure option: "--disable-hdri". And check the output is as expected.
snibgo's IM pages: im.snibgo.com
Re: problems with Magick::Pixels
That solved the issue, thank you very much indeed! Before posting I searched endlessly for the problem, because I thought build headers and binaries are consistent for sure, because I build it from the git repo.
When omitting --disable-hdri headers and binaries to not match, so apparently there is no generated configuration header as other libraries use, e. g. wxWidgets. Probably with HDRI the idea is to include other headers, I don't know, I don't need it anyway.
Just a side remark: The binaries I originally used for posting were not from my macports installation - which I successfully uninstalled now -, but they are belonging to the build (since the build date matches)
After rebuild now, both the dylib and the tools are updated:
When omitting --disable-hdri headers and binaries to not match, so apparently there is no generated configuration header as other libraries use, e. g. wxWidgets. Probably with HDRI the idea is to include other headers, I don't know, I don't need it anyway.
Just a side remark: The binaries I originally used for posting were not from my macports installation - which I successfully uninstalled now -, but they are belonging to the build (since the build date matches)
Code: Select all
~> ls -l ~/git/ImageMagick/Magick++/lib/.libs/libMagick++-7.Q16HDRI.3.dylib
-rwxr-xr-x 1 stefan staff 967776 29 Aug 22:44 /Users/stefan/git/ImageMagick/Magick++/lib/.libs/libMagick++-7.Q16HDRI.3.dylib
~> ls -l /opt/bin/magick
-rwxr-xr-x 1 root wheel 14736 29 Aug 22:44 /opt/bin/magick
Code: Select all
~> ls -l ~/git/ImageMagick/Magick++/lib/.libs/libMagick++-7.Q16.3.dylib
-rwxr-xr-x 1 stefan staff 954164 5 Nov 15:53 /Users/stefan/git/ImageMagick/Magick++/lib/.libs/libMagick++-7.Q16.3.dylib
~> ls -l /opt/bin/magick
-rwxr-xr-x 1 root wheel 14736 5 Nov 15:53 /opt/bin/magick
~> /opt/bin/magick --version
Version: ImageMagick 7.0.7-0 Q16 x86_64 2017-11-05 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC
Delegates (built-in): bzlib fontconfig freetype gvc jng jp2 jpeg lcms lzma pangocairo png tiff webp xml zlib