This package supports 6.9.x version of ImageMagick.
brew install imagemagick@6
brew install -i imagemagick@6 --with-ghostscript
./configure --disable-osx-universal-binary --prefix=/usr/local/Cellar/imagemagick@6/6.9.8-3 --disable-dependency-tracking --disable-silent-rules --enable-shared --enable-static --with-modules --disable-opencl --disable-openmp --without-webp --without-openjp2 --without-fftw --without-pango --without-x --with-freetype=yes --with-gslib=yes
make
make install
exit
sudo apt-get -y build-dep imagemagick
curl -OL https://www.imagemagick.org/download/releases/ImageMagick-6.9.6-8.tar.xz
tar xf ImageMagick-6.9.6-8.tar.xz
cd ImageMagick-6.9.6-8
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
sudo make install
sudo apt-get -y build-dep imagemagick
sudo apt-get install libgs-dev gs-esp
curl -OL https://www.imagemagick.org/download/releases/ImageMagick-6.9.6-8.tar.xz
tar xf ImageMagick-6.9.6-8.tar.xz
cd ImageMagick-6.9.6-8
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-gs-font-dir=/usr/local/share/ghostscript/fonts --with-gslib=yes
make
sudo make install
Add this package to dependencies
in your Package.swift
file.
.Package(url: "https://github.com/naithar/MagickWand.git", majorVersion: 0)
swift build -Xswiftc -I/usr/local/opt/imagemagick@6/include/ImageMagick-6 -Xlinker -L/usr/local/opt/imagemagick@6/lib -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
swift test -Xswiftc -I/usr/local/opt/imagemagick@6/include/ImageMagick-6 -Xlinker -L/usr/local/opt/imagemagick@6/lib -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
swift build -Xswiftc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=8
swift test -Xswiftc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=8
Generate XCode project using:
swift package -Xswiftc -I/usr/local/opt/imagemagick@6/include/ImageMagick-6 -Xlinker -L/usr/local/opt/imagemagick@6/lib -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16 generate-xcodeproj
This will add required flags to the project settings.
If required add values manually to Build Settings
:
-I/usr/local/opt/imagemagick@6/include/ImageMagick-6
value toOther Swift Flags
.-L/usr/local/opt/imagemagick@6/lib
value toOther Linker Flags
.