Newbie difficulties with graphicsmagick and jpeg decode delegates - terminal

I am having difficulty trying to get graphicsmagick to work. New to the coding world =]
I think I might have botched up my installation by not using brew to install.
I have an image on my /Desktop; 'sign.jpeg'
Here's what I get when I try to identify (or resize) the image:
Admins-iMac:Desktop admin$ gm identify sign.jpeg
gm identify: No decode delegate for this image format (sign.jpeg).
gm identify: Request did not return an image.
So I guess I will try unlinking and relinking:
Admins-iMac:Desktop admin$ brew unlink jpeg
Unlinking /usr/local/Cellar/jpeg/9b... 17 symlinks removed
Admins-iMac:Desktop admin$ brew link jpeg
Linking /usr/local/Cellar/jpeg/9b... 17 symlinks created
Hmm:
Admins-iMac:Desktop admin$ brew info jpeg
jpeg: stable 9b (bottled)
Image manipulation library
http://www.ijg.org
/usr/local/Cellar/jpeg/9b (20 files, 724KB) *
Poured from bottle on 2018-01-11 at 10:48:47
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/jpeg.rb
Alright so I guess I will try un/reinstalling graphicsmagick:
Admins-iMac:Desktop admin$ brew uninstall imagemagick graphicsmagick libpng jpeg
Error: No such keg: /usr/local/Cellar/imagemagick
Let me check the version info:
Admins-iMac:Desktop admin$ gm -version
GraphicsMagick 1.3.27 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2017 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP yes
DPS no
FlashPix no
FreeType no
Ghostscript (Library) no
JBIG no
JPEG-2000 no
JPEG no
Little CMS no
Loadable Modules no
OpenMP no
PNG no
TIFF no
TRIO no
UMEM no
WebP no
WMF no
X11 no
XML yes
ZLIB yes
Host type: x86_64-apple-darwin16.7.0
Configured using the command:
./configure 'CC=clang' 'LDFLAGS=-L/usr/local/libjpeg/lib -L/usr/local/libpng/lib -L/usr/local/libtiff/lib' 'CPPFLAGS=-I/usr/local/libjpeg/include -I/usr/local/libpng/include -I/usr/local/libtiff/include' '--prefix=/usr/local/mac-dev-env/graphicsmagick-1.3.27'
Final Build Parameters:
CC = clang
CFLAGS = -g -O2 -Wall -D_THREAD_SAFE
CPPFLAGS = -I/usr/local/libjpeg/include -I/usr/local/libpng/include -I/usr/local/libtiff/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
CXX = g++
CXXFLAGS = -D_THREAD_SAFE
LDFLAGS = -L/usr/local/libjpeg/lib -L/usr/local/libpng/lib -L/usr/local/libtiff/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib
LIBS = -lbz2 -lxml2 -lz -lm -lpthread
I am just not good with this terminal stuff quite yet, so I am mostly unsure how to interpret all these lines. I should have just used brew to install it in the first place D:
Any help would be appreciated!

Personally, I would recommend ImageMagick over GraphicsMagick, with reasons as in the comments above.
To sort out your current situation, I would do the following:
ensure my PATH is correct for homebrew
uninstall all the mentioned packages
install the necessary packages
check my setup
So, I'll cover each aspect of that with a separate section, and put a horizontal rule in between.
Edit your login profile, probably $HOME/.profile and make sure that /usr/local/bin is at the start because that is where homebrew installs stuff. So basically, you want a line near the end like:
export PATH=/usr/local/bin:$PATH
Exit Terminal, and then start a new Terminal and check your PATH starts correctly with /usr/local/bin by running:
echo $PATH
Now remove all the packages you have been playing with:
brew rm imagemagick jpeg libpng graphicsmagick
Now reinstall just the ones you want:
brew install jpeg libpng imagemagick
Now test that homebrew is happy, by running:
brew doctor
and following the good doctor's advice.
Then you should be able to run:
identify -version
convert -size 1024x768 gradient:red-blue first.jpg
You can see the created image by opening the Finder at the current directory:
open .
Then select the file with the mouse by tapping on it once, and press the SPACE bar to quick-look it.

I've been having issues with Homebrew's 1.3.27 version of GraphicsMagick - it doesn't seem to configure the delegates properly.
Downgrading to 1.3.26_2 has solved our issues.

Related

Why my Make file doesn't compiling in Mac and display ld: library not found for -lSystem? [duplicate]

I am getting a strange error when trying to compile a simple fortran-90 file using gfortran. I am working on a macOS mojave system. I have gfortran 8.2.0 installed and I checked to be sure of this by doing the following:
Input: gfortran --version
Output: GNU Fortran (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Which indicates that gfortran installed correctly and I also confirmed this by typing simply: gfortran, into the terminal, which returns:
gfortran: fatal error: no input files
compilation terminated.
However, when I try to compile my file like so:
gfortran hello.f90 -o hello.x
I get an error which reads:
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
I've tried compiling in different ways and I also tried setting the LD_LIBRARY_PATH in .bash_profile as described by https://gcc.gnu.org/wiki/GFortranBinaries32Linux but I still get the same error. The gfortran directory has the pathname: /usr/local/gfortran, however another gfortran which is not a directory can be found in /usr/local/bin
Typing:
which gfortran
Outputs:
/usr/local/bin/gfortran
And a long list search of this directory:
Input: ls -l /usr/local/bin/gfortran
Output: lrwxr-xr-x 1 root wheel 32 15 May 14:07
/usr/local/bin/gfortran -> /usr/local/gfortran/bin/gfortran
How can I fix this where everything seems to be correctly installed?
Any help would be greatly appreciated!
On macOS Big Sur v11.1:
Relevant SO post: https://apple.stackexchange.com/questions/408999/gfortran-compiler-error-on-mac-os-big-sur
The fix is to add the stdlib to your $LIBRARY_PATH. For some reason or another it isn't in your standard $PATH anymore on 11.1.
export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
(or add it to login file and restart terminal).
I added this to my ~/.profile:
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib"
And it works.
I'll also chime in (19 Dec 2020) that I just updated from MacOS Mojave to Catalina and suddenly got this error.
It resolved itself with
brew reinstall gcc
brew reinstall gfortran
Update: I tried what was suggested and installed the gfortran build from the gcc package using homebrew which gave me a newer version of gfortran and my problem was fixed!
I had the same problem, but installing gfortran build from the gcc package using homebrew did not help. Instead, I installed the whole gcc using homebrew:
brew install gcc
and that solved the problem.
For those using MacPorts.
# Installed `gcc8` and `gcc_select`
sudo port install gcc_select gcc8
# then to create "gfortran" softlink to "gfortran-mp-8"
sudo port select --set gcc gcc8
# and added to my .profile
export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
I did ls -l /Library/Developer/CommandLineTools/SDKs/ and found that Xcode had installed one SDK for Catalina and one for Big Sur. I changed the soft link for MacOSX.sdk to point to the Catalina version.
Just placed this line at the end of .zshrc:
export LIBRARY_PATH="$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
and ran my Fortran code again to compile – success! The issue with -lSystem has been solved in my macOS system.
I had this problem, and I'd tried lots of thing to solve the problem, but only using these "both" commands solved it:
brew reinstall gcc
brew reinstall gfortran
I recently had this
ld: library not found for -lSystem
problem after upgrading Mac OS from v10 to v11 (Big Sur). I am using Xcode 12.3 and I used brew install gcc to install gfortran 10.2.0. I still saw the error after trying brew reinstall gcc. I was able to solve the problem using:
brew install gfortran
but I do not know why this works.

Why qrencode unable to generate PNG image

My operating system is CoreELEC
$ uname -a
$ Linux CoreELEC 4.9.113 #1 SMP PREEMPT Thu May 21 01:00:42 CEST 2020 aarch64 GNU/Linux
My cpu arch is aarch64
$ arch
$ aarch64
qrencode is ok
$ qrencode -V
$ qrencode version 4.0.2
But, I can't use it to generate PNG images, like this:
$ qrencode -o /storage/pictures/a.png "LDL6867PM1S3KV9G111A"
$ PNG output is disabled at compile time. No output generated.
If anyone knows what the problem is, please let me know, thank you very much!!!
When you are building from source and you run the ./configure step, what it does is checks to see the capabilities of the system before running the make step.
If you looked at what it output when you ran ./configure as you were building qrencode you would have seen something like this:
checking for png... no
!!!!!!!!!!
LIBPNG is required to build the utility tools. Temporarily disabled.
!!!!!!!!!!
so it's telling you that you are missing libpng and therefore it's going to disable png output. So while you have built qrencode, your binary has png output disabled which isn't particularly helpful.
When you attempted to run your new qrencode binary and got this error message:
PNG output is disabled at compile time. No output generated.
It was just informing you that your binary was compiled with png output disabled because as far as ./configure could tell, libpng wasn't available on your system.
To solve this, install libpng then go back and re-build your qrencode binary - checking to make sure the ./configure step correctly finds libpng.

Compile ImageMagick from source with PNG support on OSX

I need to compile it from sources. I followed step by step instruction to build it with jpeg and png support but ImageMagick didn't include PNG to delegates list however jpeg has been included. What is wrong with PNG?
Options used to compile and link:
PREFIX = /opt/im
EXEC-PREFIX = /opt/im
VERSION = 6.9.2
CC = gcc
CFLAGS = -g -O2 -Wall -mtune=haswell -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CPPFLAGS = -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/tmp/IM/ImageMagick-6.9.2-10/jpeg -I/tmp/IM/ImageMagick-6.9.2-10/magick -I/tmp/IM/ImageMagick-6.9.2-10/png -I/tmp/IM/ImageMagick-6.9.2-10/wand
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/tmp/IM/ImageMagick-6.9.2-10/jpeg/.libs -L/tmp/IM/ImageMagick-6.9.2-10/jpeg -L/tmp/IM/ImageMagick-6.9.2-10/magick -L/tmp/IM/ImageMagick-6.9.2-10/png/.libs -L/tmp/IM/ImageMagick-6.9.2-10/png -L/tmp/IM/ImageMagick-6.9.2-10/wand
LIBS =
CXX = g++
CXXFLAGS = -g -O2 -D_THREAD_SAFE -pthread
FEATURES = DPC Cipher
DELEGATES = mpeg jpeg
Here is how I would install ImageMagick from source on OSX.
1. Install Xcode
First, you are going to need the Apple compiler and development tools whatever you do. So, start the AppStore which looks like this:
and download Xcode for free - it looks like this:
2. Install Command Line Tools
Once you have Xcode installed, you need to install the command-line tools (i.e. clang, clang++, make) like this:
xcode-select --install
3. Choose Your Method - homebrew or a Life of Agony™
Now you need to choose how you are going to proceed. The simplest option, by miles and miles and miles, is to use homebrew. The other method is self-descriptive.
3a. homebrew Method
Go to the homebrew website and copy and paste the one-liner there into your Terminal - I won't show it here because it may change and I want you and future readers to use the current command. Once homebrew is installed, you just do this to choose your ImageMagick options:
brew options imagemagick
--with-fftw
Compile with FFTW support
--with-fontconfig
Build with fontconfig support
--with-ghostscript
Build with ghostscript support
--with-hdri
Compile with HDRI support
--with-jp2
Compile with Jpeg2000 support
--with-liblqr
Build with liblqr support
--with-librsvg
Build with librsvg support
--with-libwmf
Build with libwmf support
--with-little-cms
Build with little-cms support
--with-little-cms2
Build with little-cms2 support
--with-openexr
Build with openexr support
--with-openmp
Compile with OpenMP support
--with-pango
Build with pango support
--with-perl
enable build/install of PerlMagick
--with-quantum-depth-16
Compile with a quantum depth of 16 bit
--with-quantum-depth-32
Compile with a quantum depth of 32 bit
--with-quantum-depth-8
Compile with a quantum depth of 8 bit
--with-webp
Build with webp support
--with-x11
Build with x11 support
--without-freetype
Build without freetype support
--without-jpeg
Build without jpeg support
--without-libpng
Build without libpng support
--without-libtiff
Build without libtiff support
--without-magick-plus-plus
disable build/install of Magick++
--without-opencl
Disable OpenCL
and then having selected your options, you install with
brew install imagemagick --with-perl --with-librsvg
or whatever you want. Then you are finished and you don't need to read the following torture!
Later on, upgrades are simple:
brew update && brew upgrade --all
Problem-solving is simple:
brew doctor
Uninstallation is simple:
brew rm imagemagick
3b. Life of Agony™ Method
Ok, I see you sadly decided on a Life of Agony™, so be it. I hope you know tar, bash, environment variables, gzip, make, curl. Now would be a good time to think again and use homebrew after all....
Sure you want to proceed? Ok, the general idea is to decide what features you need, install the features first, then install ImageMagick.
4. Set up a build area and environment
Set up two directories and 2 environment vars in your $HOME/.profile. These will be the build area where you build software and the sw area where you install your local software to:
export MSBUILD=$HOME/build
export MSSW=$HOME/sw
Now source your profile into your current session with
. $HOME/.profile
or just log out and log back in so that the variables above take effect.
Next create the two directories:
mkdir "$MSBUILD" "$MSSW"
5. Consider Features you need
Now consider what features you need:
5.1 Feature = PNG Support
If you need PNG support, you need zlib first. In your web-browser, go to the zlib website and find the name of the latest version. Then in Terminal:
cd $MSBUILD
curl -O -J -L http://sourceforge.net/projects/libpng/files/zlib/1.2.8/zlib-1.2.8.tar.xz/download
which gets you this zlib-1.2.8.tar.xz (or similar) which you can unpack and install with:
tar xvfJ zlib*.tar.xz # Unzip and untar what you downloaded
cd zlib*[0-9] # Change directory to wherever it unpacked to
./configure --prefix="$MSSW" # Configure with the necessary prefix
make
make install
Now you want libpng which you do with:
curl -O -J -L http://sourceforge.net/projects/libpng/files/latest/download?source=files
which gets you this (or similar):
libpng-1.6.17.tar.xz
which you install with this command:
tar xvfJ libpng*xz # Unpack and untar whatever you downloaded
cd libpng*[0-9] # Change directory to wherever it unpacked to
./configure --prefix="$MSSW" # Configure with the necessary prefix
make
make install
5.2 Feature = TIFF Support
If you need TIFF support, use this:
cd $MSBUILD
curl -O -J -L ftp://ftp.remotesensing.org/libtiff/tiff-4.0.3.tar.gz
tar xvfz tiff*tar.gz # Unzip and untar what you downloaded
cd tiff*[0-9] # Change directory to wherever it unpacked to
./configure --prefix="$MSSW" # Configure with the necessary prefix
make
make install
5.3 Feature = WEBP Support
If you need WEBP support, use this:
cd $MSBUILD
curl -O -J -L http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz
tar xvfz libwebp*tar.gz # Unzip and untar what you downloaded
cd libwebp*[0-9] # Change directory to wherever it unpacked to
./configure --prefix="$MSSW" # Configure with the necessary prefix
make
make install
5.4 Feature = JPEG Support
If you need JPEG support, use this:
cd $MSBUILD
curl -O -J -L http://www.ijg.org/files/jpegsrc.v9a.tar.gz
tar xvfz jpeg*tar.gz # Unzip and untar what you downloaded
cd jpeg-9a # Change directory to wherever it unpacked to
./configure --prefix="$MSSW" # Configure with the necessary prefix
make
make install
5.5 Feature - X11 or X Windows
As OSX no longer ships with an X11 server, you will need to install one yourself if you wish to use X11. Now, if you had taken my advice and used homebrew, you would be able to do:
brew cask install xquartz
and you would be finished. But you chose the Life of Agony ™ option, so you will have to figure out how to install XQuartz yourself.
6. ImageMagick itself
Once you have all the features you want installed, you can install ImageMagick. Get your copy here, then install like this:
cd $MSBUILD
gunzip ImageMagick.tar.gz
tar -xvf ImageMagick.tar
cd ImageMagick-6.9.1-2 # or wherever the tar-file extracted to
Now choose your options. How do you know the options available? You run:
./configure --help
and you will get a daunting array of options like this:
`configure' configures ImageMagick 6.9.2-10 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/ImageMagick]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-reproducible-build
enable reproducible build
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--enable-ld-version-script
enable linker version script (default is enabled
when possible)
--enable-bounds-checking
enable run-time bounds-checking
--enable-osx-universal-binary
build universal binary on OS X [[default=no]]
--disable-openmp do not use OpenMP
--enable-opencl enable OpenCL support
--disable-largefile omit support for large files
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-delegate-build look for delegate libraries in build directory
--disable-deprecated exclude deprecated methods in MagickCore and
MagickWand APIs
--disable-installed Formally install ImageMagick under PREFIX
--disable-cipher disable enciphering and deciphering image pixels
--enable-zero-configuration
enable self-contained, embeddable,
zero-configuration ImageMagick
--enable-hdri accurately represent the wide range of intensity
levels found in real scenes
--disable-assert disable assert() statements in build
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
--enable-hugepages enable 'huge pages' support
--enable-ccmalloc enable 'ccmalloc' memory debug support
--enable-efence enable 'efence' memory debug support
--enable-prof enable 'prof' profiling support
--enable-gprof enable 'gprof' profiling support
--enable-gcov enable 'gcov' profiling support
--disable-assert turn off assertions
--disable-docs disable building of documentation
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-dmalloc use dmalloc, as in http://www.dmalloc.com
--with-gcc-arch=<arch> use architecture <arch> for gcc -march/-mtune,
instead of guessing
--includearch-dir=DIR ARCH specific include directory
--sharearch-dir=DIR ARCH specific config directory
--with-pkgconfigdir=DIR Path to the pkgconfig directory [LIBDIR/pkgconfig]
--without-threads disable threads support
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
shared library versioning (aka "SONAME") variant to
provide on AIX, [default=aix].
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-modules enable building dynamically loadable modules
--with-method-prefix=PREFIX
prefix MagickCore API methods
--with-quantum-depth=DEPTH
number of bits in a pixel quantum (default 16)
--with-cache=THRESHOLD set pixel cache threshhold in MB (default available
memory)
--with-frozenpaths freeze delegate paths
--without-magick-plus-plus
disable build/install of Magick++
--with-package-release-name=NAME
encode this name into the shared library
--with-perl enable build/install of PerlMagick
--with-perl-options=OPTIONS
options to pass on command-line when generating
PerlMagick build file
--with-jemalloc enable jemalloc memory allocation library support
--with-umem enable umem memory allocation library support
--with-libstdc=DIR use libstdc++ in DIR (for GNU C++)
--without-bzlib disable BZLIB support
--with-x use the X Window System
--without-zlib disable ZLIB support
--with-apple-font-dir=DIR
Apple font directory
--with-autotrace enable autotrace support
--without-dps disable Display Postscript support
--with-dejavu-font-dir=DIR
DejaVu font directory
--without-fftw disable FFTW support
--without-fpx disable FlashPIX support
--without-djvu disable DjVu support
--without-fontconfig disable fontconfig support
--without-freetype disable Freetype support
--with-gslib enable Ghostscript library support
--with-fontpath=DIR prepend to default font search path
--with-gs-font-dir=DIR Ghostscript font directory
--with-gvc enable GVC support
--without-jbig disable JBIG support
--without-jpeg disable JPEG support
--without-lcms disable lcms (v1.1X) support
--without-openjp2 disable OpenJP2 support
--without-lqr disable Liquid Rescale support
--without-lzma disable LZMA support
--without-openexr disable OpenEXR support
--without-pango disable PANGO support
--without-png disable PNG support
--with-rsvg enable RSVG support
--without-tiff disable TIFF support
--without-webp disable WEBP support
--with-windows-font-dir=DIR
Windows font directory
--with-wmf enable WMF support
--without-xml disable XML support
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
CXXCPP C++ preprocessor
XMKMF Path to xmkmf, Makefile generator for X Window System
ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
AUTOTRACE_CFLAGS
C compiler flags for AUTOTRACE, overriding pkg-config
AUTOTRACE_LIBS
linker flags for AUTOTRACE, overriding pkg-config
fftw3_CFLAGS
C compiler flags for fftw3, overriding pkg-config
fftw3_LIBS linker flags for fftw3, overriding pkg-config
ddjvuapi_CFLAGS
C compiler flags for ddjvuapi, overriding pkg-config
ddjvuapi_LIBS
linker flags for ddjvuapi, overriding pkg-config
FONTCONFIG_CFLAGS
C compiler flags for FONTCONFIG, overriding pkg-config
FONTCONFIG_LIBS
linker flags for FONTCONFIG, overriding pkg-config
FREETYPE_CFLAGS
C compiler flags for FREETYPE, overriding pkg-config
FREETYPE_LIBS
linker flags for FREETYPE, overriding pkg-config
GVC_CFLAGS C compiler flags for GVC, overriding pkg-config
GVC_LIBS linker flags for GVC, overriding pkg-config
LCMS2_CFLAGS
C compiler flags for LCMS2, overriding pkg-config
LCMS2_LIBS linker flags for LCMS2, overriding pkg-config
LIBOPENJP2_CFLAGS
C compiler flags for LIBOPENJP2, overriding pkg-config
LIBOPENJP2_LIBS
linker flags for LIBOPENJP2, overriding pkg-config
LQR_CFLAGS C compiler flags for LQR, overriding pkg-config
LQR_LIBS linker flags for LQR, overriding pkg-config
LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config
LZMA_LIBS linker flags for LZMA, overriding pkg-config
OPENEXR_CFLAGS
C compiler flags for OPENEXR, overriding pkg-config
OPENEXR_LIBS
linker flags for OPENEXR, overriding pkg-config
PANGO_CFLAGS
C compiler flags for PANGO, overriding pkg-config
PANGO_LIBS linker flags for PANGO, overriding pkg-config
PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
PNG_LIBS linker flags for PNG, overriding pkg-config
RSVG_CFLAGS C compiler flags for RSVG, overriding pkg-config
RSVG_LIBS linker flags for RSVG, overriding pkg-config
CAIRO_SVG_CFLAGS
C compiler flags for CAIRO_SVG, overriding pkg-config
CAIRO_SVG_LIBS
linker flags for CAIRO_SVG, overriding pkg-config
XML_CFLAGS C compiler flags for XML, overriding pkg-config
XML_LIBS linker flags for XML, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <http://www.imagemagick.org>.
Once you have chosen your options, install with a command that looks like this:
./configure --prefix="$MSSW" --with-modules --disable-docs --without-x --enable-hdri=yes --with-quantum-depth=16
make
make install
Now add $MSSW/bin to your PATH in $HOME/.profile.
export PATH=$HOME/sw/bin:${PATH}
And log out and back in again to make the new PATH active (or dot in your profile, if you know what that means).
7. Test the installation
Now test it with:
identify -version
Version: ImageMagick 6.9.2-10 Q16 x86_64 2015-12-23 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib cairo fontconfig freetype jng jp2 jpeg lcms ltdl lzma png rsvg tiff webp x xml zlib

Building ImageMagick with JP2 delegate on Mac OS X

I'm trying to install (build) ImageMagick (currently 6.9.0) on a Mac running OS X 10.9.5.
I need the JP2 support, and for some reasons, while enabling jp2 with configure, I got this warning:
configure: WARNING: unrecognized options: --with-jp2
and the delegates table leave me with a blank as a value:
JPEG-2000 --with-jp2=yes
and got that at the end:
CXXFLAGS = -g -O2 -D_THREAD_SAFE -pthread
FEATURES = DPC HDRI OpenMP
DELEGATES = bzlib mpeg fftw fontconfig freetype jng jpeg pango png ps tiff x zlib
I can build it like this but the JP2 won't work, I know it as I tried.
So I'm kinda stuck here, how can I force the jp2 delegate?
Thanks
If you are using homebrew then simply set the appropriate flag, in this case --with-openjpeg, so to install you simple do
brew install imagemagick --with-openjpeg
If imagemagick is already installed then use brew reinstall imagemagick --with-openjpeg or uninstall first. Also remember that you can always check the available brew options using brew info imagemagick (this holds for any package/formula).
Use brew uninstall ImageMagick. Make sure convert doesn't show anything and then brew install ImageMagick. Hope this helps! Worked for me!

How Do I Install Ruby Shoes On x64 Linux?

I recently discovered Ruby Shoes, which sounds rather useful for a beginner like me. The only the problem is that my laptop is x64, while the only Linux package is i686. I tried it anyway and it didn't work for me, I kept getting an error. I didn't expect it to work, of course, but is there still a way to get Shoes on x64 Linux? Thanks!
There doesn't appear to be a 64-bit package for Linux, so if your distro doesn't package shoes you'll need to compile it yourself. This isn't as scary as it sounds!
First, make sure you have the proper development libraries:
Shoes relies on Cairo, Pango, libungif, libjpeg, GTK+ 2.0, and Ruby,
as well as GCC and its linker.
To install all of these libraries on Ubuntu or Debian:
# aptitude install libcairo2-dev libpixman-1-dev libpango1.0-dev \
libungif4-dev libjpeg62-dev libgtk2.0-dev vlc libvlc-dev \
libsqlite3-dev libcurl4-openssl-dev ruby1.8-dev rake
(On Ubuntu older than 8.10, actually you'll need libvlc0-dev.)
To install these libraries on Fedora:
# yum install -y giflib-devel cairo-devel libpixman-devel \
pango-devel libjpeg-devel gtk2-devel sqlite-devel vlc-devel \
libcurl-devel ruby-devel
I can get more specific if I knew what distribution you're using. Once you're ready, grab the tarball from shoooes.net and unpack it.
Then, enter the directory and run
make
this will build the project. Assuming this completes successfully, run
make install
If you need further help compiling this, consider joining the mailing list
Send a message to shoes AT code.whytheluckystiff.net
Cc: why AT whytheluckystiff.net
or #shoes on irc.freenode.net
I'm using Fedora Core 10. Here's what I get when I attempt building it.
$ ~/shoes-0.r1134
bash: /home/Alex/shoes-0.r1134: is a directory
$ make
make: *** No targets specified and no makefile found. Stop
Alternatively...
$ make shoes-0.r1134
make: Nothing to be done for `shoes-0.r1134'.
Also, I've looked in the repo's, and Ruby Shoes isn't in it.
I tried the instructions above. I got
[nathan#ebisu ~/tmp/shoes-0.r1134] make
build options: shoes raisins (0.r1134) [x86_64-linux]
CC = cc
RUBY = /usr
OPTIONS =
CC shoes/app.c
CC shoes/canvas.c
CC shoes/effects.c
CC shoes/image.c
CC shoes/internal.c
CC shoes/ruby.c
CC shoes/world.c
CC shoes/native/gtk.c
CC shoes/http/curl.c
CC -o dist/libshoes.so
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for -ljpeg
CC bin/main.c
CC -o dist/shoes-bin
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libjpeg.a when searching for -ljpeg
cp: cannot stat `/usr/lib/libruby.so': No such file or directory
make: *** [dist/shoes.launch] Error 1
Obviously I do have libjpeg installed.

Resources