added autoorient feature
Project is currently under development.Some feature may not work as expected or may not work at all.Use at your own risk.
PRs and bugreports are more than welcome.
This package supports 6.9.x version of ImageMagick.
It should be possible it install MagickWand with required dependencies using script at /common/install-imagemagick.sh
MagickWand
/common/install-imagemagick.sh
curl -O -L https://github.com/naithar/MagickWand/raw/master/common/install-imagemagick.sh bash install-imagemagick.sh
brew install imagemagick@6
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
Add this package to dependencies in your Package.swift file.
dependencies
Package.swift
.Package(url: "https://github.com/naithar/MagickWand.git", majorVersion: 0)
eval $(echo 'swift build -Xlinker -L/usr/local/lib/' `Magick-config --cflags` | sed 's/\(-[DI]\)/-Xcc /g') eval $(echo 'swift test -Xlinker -L/usr/local/lib/' `Magick-config --cflags` | sed 's/\(-[DI]\)/-Xcc /g')
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 -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16 swift test -Xcc -I/usr/local/include/ImageMagick-6/ -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16
Generate XCode project using this command:
swift package -Xlinker -L/usr/local/lib/ -Xcc -DMAGICKCORE_HDRI_ENABLE=0 -Xcc -DMAGICKCORE_QUANTUM_DEPTH=16 -Xswiftc -I/usr/local/include/ImageMagick-6 -Xcc -I/usr/local/include/ImageMagick-6 generate-xcodeproj
Both -Xcc and -Xswiftc flags can be requested using Magick-config --cflags command
-Xcc
-Xswiftc
Magick-config --cflags
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Disclaimer
Project is currently under development.
Some feature may not work as expected or may not work at all.
Use at your own risk.
PRs and bugreports are more than welcome.
Swift MagickWand
This package supports 6.9.x version of ImageMagick.
Intallation
Shared
It should be possible it install
MagickWand
with required dependencies using script at/common/install-imagemagick.sh
Mac OSX
Linux
Install Dependencies
Install ImageMagick
Add Package
Add this package to
dependencies
in yourPackage.swift
file.Building and Testing
Shared
Mac OSX
Linux
XCode Setup
Generate XCode project using this command:
Both
-Xcc
and-Xswiftc
flags can be requested usingMagick-config --cflags
command