How to enable support for JPG in ImageMagick in Mac OS X?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
avamk
Posts: 3
Joined: 2011-04-12T18:31:29-07:00
Authentication code: 8675308

How to enable support for JPG in ImageMagick in Mac OS X?

Post by avamk »

I have installed the latest ImageMagick available from MacPorts under Mac OS X 10.6.7, this is the output from "convert -version":

Code: Select all

Version: ImageMagick 6.6.9-1 2011-04-12 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP OpenCL HDRI
I run the following command with the following error:

Code: Select all

$composite -gravity center dot.jpg J2535101026104111_249.jpg: new-image.jpg

composite: no decode delegate for this image format `' @ error/constitute.c/ReadImage/532.
composite: missing an image filename `new-image.jpg' @ error/composite.c/CompositeImageCommand/1616.
What am I doing wrong? Thanks for your help.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to enable support for JPG in ImageMagick in Mac OS X

Post by magick »

Does Macports include support for JPEG? Type
  • convert -list format
Is JPEG listed as a supported image format?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to enable support for JPG in ImageMagick in Mac OS X

Post by fmw42 »

composite -gravity center dot.jpg J2535101026104111_249.jpg: new-image.jpg
why is there a : after your J2535101026104111_249.jpg:

try removing the colon
avamk
Posts: 3
Joined: 2011-04-12T18:31:29-07:00
Authentication code: 8675308

Re: How to enable support for JPG in ImageMagick in Mac OS X

Post by avamk »

magick wrote:Does Macports include support for JPEG? Type
  • convert -list format
Is JPEG listed as a supported image format?
Yes, JPEG is listed as a supported format with "rw-"
avamk
Posts: 3
Joined: 2011-04-12T18:31:29-07:00
Authentication code: 8675308

Re: How to enable support for JPG in ImageMagick in Mac OS X

Post by avamk »

fmw42 wrote:
composite -gravity center dot.jpg J2535101026104111_249.jpg: new-image.jpg
why is there a : after your J2535101026104111_249.jpg:

try removing the colon
Ah ha! That solved it, now the composite works as I like. Thank you so much!
chungonn
Posts: 2
Joined: 2011-05-08T02:39:51-07:00
Authentication code: 8675308

Re: How to enable support for JPG in ImageMagick in Mac OS X

Post by chungonn »

I am a newbie, started with ImageMagick only yesterday, I have the same error as avamk but my problem is a missing JPEG delegate after I do 'convert -list format' as suggested by imagick.

I did some research in the net and listed below is the output of 'convert -list configure', I find there is a missing -ljpeg option. My port list shows that I have Jpeg installed. My environment is - OSX 10.6.7, 32bit.

Any help is greatly appreciated

Thanks in advance
chungonn


$ port list | grep jpeg
jpeg @8c graphics/jpeg
jpeg2ps @1.9 graphics/jpeg2ps
jpeg6b @6b graphics/jpeg6b
jpegpixi @1.1.1 graphics/jpegpixi
openjpeg @1.4-r697 graphics/openjpeg
mjpegtools @1.9.0 multimedia/mjpegtools
p5-image-metadata-jpeg @0.153 perl/p5-image-metadata-jpeg

$ convert -list configure

Path: /opt/share/ImageMagick-6.6.9/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -D_THREAD_SAFE -D_THREAD_SAFE -pthread -fopenmp -g -O2 -Wall -D_THREAD_SAFE -pthread
CODER_PATH /opt/lib/ImageMagick-6.6.9/modules-Q16/coders
CONFIGURE ./configure '--prefix=/opt' '--with-quantum-depth=16' '--disable-dependency-tracking' '--with-x=yes' '--x-includes=/usr/X11R6/include' '--x-libraries=/usr/X11R6/lib/' '--without-perl'
CONFIGURE_PATH /opt/etc/ImageMagick/
COPYRIGHT Copyright (C) 1999-2011 ImageMagick Studio LLC
CPPFLAGS -I/opt/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -D_THREAD_SAFE -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib fontconfig freetype gvc png rsvg x11 xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no
DOCUMENTATION_PATH /opt/share/doc/ImageMagick-6.6.9/
EXEC-PREFIX /opt
EXECUTABLE_PATH /opt/bin
FEATURES OpenMP
FILTER_PATH /opt/lib/ImageMagick-6.6.9/modules-Q16/filters
HOST i386-apple-darwin10.7.0
LDFLAGS -L/opt/lib -L/usr/X11R6/lib/ -R/usr/X11R6/lib/
LIB_VERSION 0x669
LIB_VERSION_NUMBER 6,6,9,8
LIBRARY_PATH /opt/lib/ImageMagick-6.6.9
LIBS -lMagickCore -lfreetype -lpng -L/opt/local/lib -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -L/opt/local/lib -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lm -lcairo -lgobject-2.0 -lgmodule-2.0 -lpng14 -lgthread-2.0 -lglib-2.0 -lintl -lxml2 -L/opt/local/lib -lgvc -lgraph -lcdt -lz -lm -lgomp -lclparser -Wl,-framework,OpenCL -L/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries -lm -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /opt
QuantumDepth 16
RELEASE_DATE 2011-05-08
SHARE_PATH /opt/share/ImageMagick-6.6.9
SVN_REVISION exported
TARGET_CPU i386
TARGET_OS darwin10.7.0
TARGET_VENDOR apple
VERSION 6.6.9
WEBSITE http://www.imagemagick.org

Path: [built-in]

Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
chungonn
Posts: 2
Joined: 2011-05-08T02:39:51-07:00
Authentication code: 8675308

Re: How to enable support for JPG in ImageMagick in Mac OS X

Post by chungonn »

I got it fixed by installing ImageMagick using macports
Post Reply