Supported image formats with MagickWand API
Supported image formats with MagickWand API
After fixing my compiling/linking problems yesterday, I'm getting a feel for some of the functions.
MagickWand *mw = NULL;
MagickWandGenesis();
mw = NewMagickWand();
if( MagickReadImage(mw,"input.jpg") == MagickFalse ) ThrowWandException(mw);
src/callbacks.c test_wand 41 no decode delegate for this image format `input.jpg' @ error/constitute.c/ReadImage/550
Also tried with a .png file, same thing.
src/callbacks.c test_wand 41 no decode delegate for this image format `input.png' @ error/constitute.c/ReadImage/550
Windows 7, program built with MinGW. What additional files or libraries do I need?
Thank you.
MagickWand *mw = NULL;
MagickWandGenesis();
mw = NewMagickWand();
if( MagickReadImage(mw,"input.jpg") == MagickFalse ) ThrowWandException(mw);
src/callbacks.c test_wand 41 no decode delegate for this image format `input.jpg' @ error/constitute.c/ReadImage/550
Also tried with a .png file, same thing.
src/callbacks.c test_wand 41 no decode delegate for this image format `input.png' @ error/constitute.c/ReadImage/550
Windows 7, program built with MinGW. What additional files or libraries do I need?
Thank you.
Re: Supported image formats with MagickWand API
Certain formats require external delegate library or programs. Did you install the JPEG library and JPEG headers on your system before you built ImageMagick? Type 'convert -list format'. Is JPEG listed as supported?
Re: Supported image formats with MagickWand API
I had not installed anything besides MinGW and ImageMagick.
I don't see JPEG listed after 'convert -list format':
Just tried the test program with .bmp files, and it worked.
So, I need to
- install jpeg library and headers (from
- re-run configure for ImageMagick, compile it, install it
Google, went to http://www.ijg.org/files/ and downloaded the latest version (8d). Ran configure, make, and make install. OK. There's a libjpeg.a in /usr/local/lib now.
For ImageMagick, re-ran configure, make clean, make, make install. (The configure script spat out the following, which struck me as suspiciously not good.)
Still no jpeg listed under 'convert -list format' ...
Re-built the test program and ran it, same problem of course.
Should I be using a different jpeg library? Thank you again.
I don't see JPEG listed after 'convert -list format':
Code: Select all
Format Module Mode Description
-------------------------------------------------------------------------------
3FR DNG r-- Hasselblad CFV/H3D39II
A* RAW rw+ Raw alpha samples
AAI* AAI rw+ AAI Dune image
AI PDF rw- Adobe Illustrator CS2
ART* ART rw- PFS: 1st Publisher Clip Art
ARW DNG r-- Sony Alpha Raw Image Format
AVI MPEG r-- Microsoft Audio/Visual Interleaved
AVS* AVS rw+ AVS X image
B* RAW rw+ Raw blue samples
BMP* BMP rw- Microsoft Windows bitmap image
BMP2* BMP -w- Microsoft Windows bitmap image (V2)
BMP3* BMP -w- Microsoft Windows bitmap image (V3)
C* RAW rw+ Raw cyan samples
CAL* CALS r-- Continuous Acquisition and Life-cycle Support Type 1
Specified in MIL-R-28002 and MIL-PRF-28002
CALS* CALS r-- Continuous Acquisition and Life-cycle Support Type 1
Specified in MIL-R-28002 and MIL-PRF-28002
CANVAS* XC r-- Constant image uniform color
CAPTION* CAPTION r-- Caption
CIN* CIN rw- Cineon Image File
CIP* CIP -w- Cisco IP phone image format
CLIP* CLIP -w+ Image Clip Mask
CLIPBOARD* CLIPBOARD rw- The system clipboard
CMYK* CMYK rw+ Raw cyan, magenta, yellow, and black samples
CMYKA* CMYK rw+ Raw cyan, magenta, yellow, black, and alpha samples
CR2 DNG r-- Canon Digital Camera Raw Image Format
CRW DNG r-- Canon Digital Camera Raw Image Format
CUR* CUR rw- Microsoft icon
CUT* CUT r-- DR Halo
DCM* DCM r-- Digital Imaging and Communications in Medicine image
DICOM is used by the medical community for images like X-rays. The
specification, "Digital Imaging and Communications in Medicine
(DICOM)", is available at http://medical.nema.org/. In particular,
see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
and supplement 61 which adds JPEG-2000 encoding.
DCR DNG r-- Kodak Digital Camera Raw Image File
DCX* PCX rw+ ZSoft IBM PC multi-page Paintbrush
DDS* DDS r-- Microsoft DirectDraw Surface
DFONT* TTF --- Multi-face font package
DNG DNG r-- Digital Negative
DPX* DPX rw- SMPTE 268M-2003 (DPX 2.0)
Digital Moving Picture Exchange Bitmap, Version 2.0.
See SMPTE 268M-2003 specification at http://www.smtpe.org
EMF WMF --- Windows WIN32 API rendered Enhanced Meta File
EPDF PDF rw- Encapsulated Portable Document Format
EPI PS rw- Encapsulated PostScript Interchange format
EPS PS rw- Encapsulated PostScript
EPS2* PS2 -w- Level II Encapsulated PostScript
EPS3* PS3 -w+ Level III Encapsulated PostScript
EPSF PS rw- Encapsulated PostScript
EPSI PS rw- Encapsulated PostScript Interchange format
ERF DNG r-- Epson RAW Format
FAX* FAX rw+ Group 3 FAX
FAX machines use non-square pixels which are 1.5 times wider than
they are tall but computer displays use square pixels, therefore
FAX images may appear to be narrow unless they are explicitly
resized using a geometry of "150x100%".
FITS* FITS rw- Flexible Image Transport System
FRACTAL* PLASMA r-- Plasma fractal image
FTS* FTS rw- Flexible Image Transport System
G* RAW rw+ Raw green samples
G3* FAX rw- Group 3 FAX
GIF* GIF rw+ CompuServe graphics interchange format
GIF87* GIF rw- CompuServe graphics interchange format (version 87a)
GRADIENT* GRADIENT r-- Gradual linear passing from one shade to another
GRAY* GRAY rw+ Raw gray samples
HALD* r-- Identity Hald color lookup table image
HDR* HDR rw+ Radiance RGBE image format
HISTOGRAM* HISTOGRAM -w- Histogram of the image
HRZ* HRZ rw- Slow Scan TeleVision
HTM* HTML -w- Hypertext Markup Language and a client-side image map
HTML* HTML -w- Hypertext Markup Language and a client-side image map
ICB* TGA rw- Truevision Targa image
ICO* ICON rw+ Microsoft icon
ICON* ICON rw- Microsoft icon
INFO INFO -w+ The image format and characteristics
INLINE* INLINE r-- Base64-encoded inline images
IPL* IPL rw+ IPL Image Sequence
K* RAW rw+ Raw black samples
K25 DNG r-- Kodak Digital Camera Raw Image Format
KDC DNG r-- Kodak Digital Camera Raw Image Format
LABEL* LABEL r-- Image label
M* RAW rw+ Raw magenta samples
M2V MPEG rw+ MPEG Video Stream
M4V MPEG rw+ Raw MPEG-4 Video
MAC* MAC r-- MAC Paint
MAP* MAP rw- Colormap intensities and indices
MAT MAT rw+ MATLAB level 5 image format
MATTE* MATTE -w+ MATTE format
MEF DNG r-- Mamiya Raw Image File
MIFF* MIFF rw+ Magick Image File Format
MONO* MONO rw- Raw bi-level bitmap
MOV MPEG rw+ MPEG Video Stream
MP4 MPEG rw+ MPEG-4 Video Stream
MPC* MPC rw+ Magick Persistent Cache image format
MPEG MPEG rw+ MPEG Video Stream
MPG MPEG rw+ MPEG Video Stream
MRW DNG r-- Sony (Minolta) Raw Image File
MSL* MSL --- Magick Scripting Language
MSVG SVG -w+ ImageMagick's own SVG internal renderer
MTV* MTV rw+ MTV Raytracing image format
MVG* MVG rw- Magick Vector Graphics
NEF DNG r-- Nikon Digital SLR Camera Raw Image File
NRW DNG r-- Nikon Digital SLR Camera Raw Image File
NULL* NULL rw- Constant image of uniform color
O* RAW rw+ Raw opacity samples
ORF DNG r-- Olympus Digital Camera Raw Image File
OTB* OTB rw- On-the-air bitmap
OTF* TTF --- Open Type font
PAL* UYVY rw- 16bit/pixel interleaved YUV
PALM* PALM rw+ Palm pixmap
PAM* PNM rw+ Common 2-dimensional bitmap format
PANGO* PANGO --- Pango Markup Language
PATTERN* PATTERN r-- Predefined pattern
PBM* PNM rw+ Portable bitmap format (black and white)
PCD* PCD rw- Photo CD
PCDS* PCD rw- Photo CD
PCL PCL rw+ Printer Control Language
PCT* PICT rw- Apple Macintosh QuickDraw/PICT
PCX* PCX rw- ZSoft IBM PC Paintbrush
PDB* PDB rw+ Palm Database ImageViewer Format
PDF PDF rw+ Portable Document Format
PDFA PDF rw+ Portable Document Archive Format
PEF DNG r-- Pentax Electronic File
PES* PES r-- Embrid Embroidery Format
PFA* TTF --- Postscript Type 1 font (ASCII)
PFB* TTF --- Postscript Type 1 font (binary)
PFM* PFM rw+ Portable float format
PGM* PNM rw+ Portable graymap format (gray scale)
PICON* XPM rw- Personal Icon
PICT* PICT rw- Apple Macintosh QuickDraw/PICT
PIX* PIX r-- Alias/Wavefront RLE image format
PLASMA* PLASMA r-- Plasma fractal image
PNM* PNM rw+ Portable anymap
PPM* PNM rw+ Portable pixmap format (color)
PREVIEW* PREVIEW -w- Show a preview an image enhancement, effect, or f/x
PS PS rw+ PostScript
PS2* PS2 -w+ Level II PostScript
PS3* PS3 -w+ Level III PostScript
PSB* PSD rw+ Adobe Large Document Format
PSD* PSD rw+ Adobe Photoshop bitmap
PWP* PWP r-- Seattle Film Works
R* RAW rw+ Raw red samples
RADIAL-GRADIENT* GRADIENT r-- Gradual radial passing from one shade to another
RAF DNG r-- Fuji CCD-RAW Graphic File
RAS* SUN rw+ SUN Rasterfile
RGB* RGB rw+ Raw red, green, and blue samples
RGBA* RGB rw+ Raw red, green, blue, and alpha samples
RGBO* RGB rw+ Raw red, green, blue, and opacity samples
RLA* RLA r-- Alias/Wavefront image
RLE* RLE r-- Utah Run length encoded image
RW2 DNG r-- Panasonic Lumix Raw Image
SCR* SCR r-- ZX-Spectrum SCREEN$
SCT* SCT r-- Scitex HandShake
SFW* SFW r-- Seattle Film Works
SGI* SGI rw+ Irix RGB image
SHTML* HTML -w- Hypertext Markup Language and a client-side image map
SR2 DNG r-- Sony Raw Format 2
SRF DNG r-- Sony Raw Format
STEGANO* STEGANO r-- Steganographic image
SUN* SUN rw+ SUN Rasterfile
SVG SVG -w+ Scalable Vector Graphics
SVGZ SVG -w+ Compressed Scalable Vector Graphics
TEXT* TXT rw+ Text
TGA* TGA rw- Truevision Targa image
THUMBNAIL* THUMBNAIL -w+ EXIF Profile Thumbnail
TILE* TILE r-- Tile image with a texture
TIM* TIM r-- PSX TIM
TTC* TTF --- TrueType font collection
TTF* TTF --- TrueType font
TXT* TXT rw+ Text
UIL* UIL -w- X-Motif UIL table
UYVY* UYVY rw- 16bit/pixel interleaved YUV
VDA* TGA rw- Truevision Targa image
VICAR* VICAR rw- VICAR rasterfile format
VID* VID rw+ Visual Image Directory
VIFF* VIFF rw+ Khoros Visualization image
VST* TGA rw- Truevision Targa image
WBMP* WBMP rw- Wireless Bitmap (level 0) image
WMFWIN32 WMFWIN32 --- Windows WIN32 API rendered Meta File
WMV MPEG rw+ Windows Media Video
WPG* WPG r-- Word Perfect Graphics
X3F DNG r-- Sigma Camera RAW Picture File
XBM* XBM rw- X Windows system bitmap (black and white)
XC* XC r-- Constant image uniform color
XCF* XCF r-- GIMP image
XPM* XPM rw- X Windows system pixmap (color)
XPS XPS r-- Microsoft XML Paper Specification
XV* VIFF rw+ Khoros Visualization image
Y* RAW rw+ Raw yellow samples
YCbCr* YCbCr rw+ Raw Y, Cb, and Cr samples
YCbCrA* YCbCr rw+ Raw Y, Cb, Cr, and alpha samples
YUV* YUV rw- CCIR 601 4:1:1 or 4:2:2
* native blob support
r read support
w write support
+ support for multiple images
So, I need to
- install jpeg library and headers (from
- re-run configure for ImageMagick, compile it, install it
Google, went to http://www.ijg.org/files/ and downloaded the latest version (8d). Ran configure, make, and make install. OK. There's a libjpeg.a in /usr/local/lib now.
For ImageMagick, re-ran configure, make clean, make, make install. (The configure script spat out the following, which struck me as suspiciously not good.)
Code: Select all
Delegate Configuration:
[...]
JPEG v1 --with-jpeg=yes no
JPEG-2000 --with-jp2=yes no
[...]
Re-built the test program and ran it, same problem of course.
Should I be using a different jpeg library? Thank you again.
Re: Supported image formats with MagickWand API
The JPEG validation test is failing. Make sure the header files are installed. Check config.log to discover why the validation test for JPEG failed, fix the problem, and rerun the configure script until JPEG is validated. Now install ImageMagick and you should have JPEG support.
Re: Supported image formats with MagickWand API
The jpeg-8d 'make install' did copy jpeglib.h to /usr/local/include ... it's there.magick wrote:The JPEG validation test is failing. Make sure the header files are installed. Check config.log to discover why the validation test for JPEG failed, fix the problem, and rerun the configure script until JPEG is validated. Now install ImageMagick and you should have JPEG support.
config.log says, in part
Code: Select all
configure:29494: checking jpeglib.h presence
configure:29494: gcc -E -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -D_DLL -D_MT conftest.c
conftest.c:175:21: fatal error: jpeglib.h: No such file or directory
Round about line 29494 of the ImageMagick configure script is the following -
Code: Select all
ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
if test "x$ac_cv_header_jpeglib_h" = xyes; then :
passed=`expr $passed + 1`
else
failed=`expr $failed + 1`
fi
Re: Supported image formats with MagickWand API
Have you read http://www.imagemagick.org/script/advan ... lation.php? You may need to configure the CPPFLAGS.
Re: Supported image formats with MagickWand API
I made some attempts using JUST the jpeg package jpegsrc.v8d.tar.gz which put jpeg headers and lib files in /usr/local ... the ImageMagick ./configure saw the jpeg libraries and spat out a DELEGATES line that included "jpeg" but it still didn't work. Same error:
I downloaded http://sourceforge.net/projects/getgnuwin32/?source=dlp per the address you gave me and spent several hours yesterday following those instructions. It looks like a whole lot of stuff I don't need, but now I get a different set of errors. Installed everything to /home/pgg/gunwin32. ImageMagick's configure script seemed to be satisfied:
Trying to make ImageMagick then runs into issues ... odd warnings and finally an error:
What now? Thank you.
Code: Select all
src/callbacks.c test_wand 32 no decode delegate for this image format `input.jpg' @ error/constitute.c/ReadImage/550
Code: Select all
pgg@g550 ~/project/ImageMagick-6.8.1-9
$ export CPPFLAGS="-I/home/pgg/gnuwin32/include"
pgg@g550 ~/project/ImageMagick-6.8.1-9
$ export LDFLAGS="-L/home/pgg/gnuwin32/lib"
pgg@g550 ~/project/ImageMagick-6.8.1-9
$ ./configure --without-perl
[...]
ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type: i686-pc-mingw32
Build system type: i686-pc-mingw32
Option Value
-------------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Module support --with-modules=no no
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=no no
Delegate Configuration:
BZLIB --with-bzlib=yes yes
Autotrace --with-autotrace=no no
Dejavu fonts --with-dejavu-font-dir=default none
DJVU --with-djvu=yes no
DPS --with-dps=yes no
FFTW --with-fftw=yes no
FlashPIX --with-fpx=yes no
FontConfig --with-fontconfig=yes no
FreeType --with-freetype=yes no (failed tests)
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gswin32c (unknown)
Ghostscript fonts --with-gs-font-dir=default none
Ghostscript lib --with-gslib=no no
Graphviz --with-gvc=no
JBIG --with-jbig=yes yes
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS v1 --with-lcms=yes no
LCMS v2 --with-lcms2=yes no
LQR --with-lqr=yes no
LTDL --with-ltdl=yes no
LZMA --with-lzma=yes no
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
PANGO --with-pango=yes no
PERL --with-perl=no no
PNG --with-png=yes yes
RSVG --with-rsvg=no no
TIFF --with-tiff=yes yes
WEBP --with-webp=yes no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=no no
X11 --with-x= no
XML --with-xml=yes no (failed tests)
ZLIB --with-zlib=yes yes
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.8.1
CC = gcc -std=gnu99 -std=gnu99
CFLAGS = -fopenmp -g -O2 -Wall -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CPPFLAGS = -I/usr/local/include/ImageMagick -D_DLL -D_MT
PCFLAGS = -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -D_DLL -D_MT
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/home/pgg/gnuwin32/lib
MAGICK_LDFLAGS = -L/usr/local/lib -L/home/pgg/gnuwin32/lib
LIBS = -lMagickCore -ljbig -ltiff -ljpeg -lpng12 -lbz2 -lz -lgdi32 -lm -lgomp -lpthread
CXX = g++
CXXFLAGS = -g -O2
FEATURES = OpenMP
DELEGATES = bzlib mpeg jbig jng jpeg png ps tiff zlib
Code: Select all
[...]
CC coders/magick_libMagickCore_Q16_la-ept.lo
CC coders/magick_libMagickCore_Q16_la-tiff.lo
CC filters/magick_libMagickCore_Q16_la-analyze.lo
CCLD magick/libMagickCore-Q16.la
libtool: link: warning: library `/home/pgg/gnuwin32/lib/libpng12.la' was moved.
*** Warning: linker path does not have real file for library -luuid.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libuuid and none of the candidates passed a file format test
*** using a file magic. Last file checked: /mingw/lib/libuuid.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
copying selected object files to avoid basename conflicts...
CC wand/wand_libMagickWand_Q16_la-animate.lo
CC wand/wand_libMagickWand_Q16_la-compare.lo
[...]
CC wand/wand_libMagickWand_Q16_la-wand.lo
CC wand/wand_libMagickWand_Q16_la-wand-view.lo
CCLD wand/libMagickWand-Q16.la
*** Warning: This system can not link to static lib archive magick/libMagickCore-Q16.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
libtool: link: warning: `/home/pgg/gnuwin32/lib/libpng12.la' seems to be moved
libtool: link: warning: `c:/mingw/lib/libintl.la' seems to be moved
libtool: link: warning: library `/home/pgg/gnuwin32/lib/libpng12.la' was moved.
*** Warning: linker path does not have real file for library -luuid.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libuuid and none of the candidates passed a file format test
*** using a file magic. Last file checked: /mingw/lib/libuuid.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
CXX Magick++/lib/Blob.lo
CXX Magick++/lib/BlobRef.lo
CXX Magick++/lib/CoderInfo.lo
[...]
libtool: link: warning: library `/home/pgg/gnuwin32/lib/libpng12.la' was moved.
libtool: link: warning: library `/home/pgg/gnuwin32/lib/libpng12.la' was moved.
utilities/animate.o: In function `AnimateMain':
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:81: undefined reference to `_imp__MagickCoreGenesis'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:82: undefined reference to `_imp__AcquireExceptionInfo'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:83: undefined reference to `_imp__AcquireImageInfo'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:84: undefined reference to `_imp__AnimateImageCommand'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:84: undefined reference to `_imp__MagickCommandGenesis'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:86: undefined reference to `_imp__DestroyImageInfo'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:87: undefined reference to `_imp__DestroyExceptionInfo'
C:\MinGW\msys\1.0\home\pgg\project\ImageMagick-6.8.1-9/utilities/animate.c:88: undefined reference to `_imp__MagickCoreTerminus'
collect2: ld returned 1 exit status
make[2]: *** [utilities/animate.exe] Error 1
make[2]: Leaving directory `/home/pgg/project/ImageMagick-6.8.1-9'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pgg/project/ImageMagick-6.8.1-9'
make: *** [all] Error 2
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Supported image formats with MagickWand API
I don't know if this is relevant, but sometimes there are conflicts between libjpg 6 and libjpg 8. Do you have both? I think IM needs the right one. I am using libjpeg 8 and things work.
libjpeg.8.dylib
libjpeg.8.dylib
Re: Supported image formats with MagickWand API
I tried with only jpeg 8, before chasing after that gnuwin32 mess.
Unpacked jpegsrc.v8d.tar.gz, ran configure, make, make install. It put header files and libraries in /usr/local/include and /usr/local/lib.
ImageMagic configured without complaint and listed jpeg as a delegate.
Test program built just fine with -ljpeg as a linker option. Did not work. The IM routine quit complaining that there was no decode delegate.
Unpacked jpegsrc.v8d.tar.gz, ran configure, make, make install. It put header files and libraries in /usr/local/include and /usr/local/lib.
ImageMagic configured without complaint and listed jpeg as a delegate.
Test program built just fine with -ljpeg as a linker option. Did not work. The IM routine quit complaining that there was no decode delegate.
Re: Supported image formats with MagickWand API
OK, totally clean/new MinGW install, then installed a fresh copy of jpeg-8d.
Here we are:
So far, so good. I then ran 'make' followed by 'make install' for ImageMagick. No errors. Everything where its supposed to be:
Even with this shortest of test programs
It quits with the same error: "no decode delegate for this image format `input.jpg'
Code: Select all
pgg@g550 ~/jpeg-8d
$ make install
make[1]: Entering directory `/home/pgg/jpeg-8d'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --mode=install /bin/install -c libjpeg.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libjpeg.dll.a /usr/local/lib/libjpeg.dll.a
libtool: install: base_file=`basename libjpeg.la`
libtool: install: dlpath=`/bin/sh 2>&1 -c '. .libs/'libjpeg.la'i; echo libjpeg-8.dll'`
libtool: install: dldir=/usr/local/lib/`dirname ../bin/libjpeg-8.dll`
libtool: install: test -d /usr/local/lib/../bin || mkdir -p /usr/local/lib/../bin
libtool: install: /bin/install -c .libs/libjpeg-8.dll /usr/local/lib/../bin/libjpeg-8.dll
libtool: install: chmod a+x /usr/local/lib/../bin/libjpeg-8.dll
libtool: install: if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/lib/../bin/libjpeg-8.dll' || exit 0; fi
libtool: install: /bin/install -c .libs/libjpeg.lai /usr/local/lib/libjpeg.la
libtool: install: /bin/install -c .libs/libjpeg.a /usr/local/lib/libjpeg.a
libtool: install: chmod 644 /usr/local/lib/libjpeg.a
libtool: install: ranlib /usr/local/lib/libjpeg.a
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
/bin/sh ./libtool --mode=install /bin/install -c cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe '/usr/local/bin'
libtool: install: /bin/install -c .libs/cjpeg.exe /usr/local/bin/cjpeg.exe
libtool: install: /bin/install -c .libs/djpeg.exe /usr/local/bin/djpeg.exe
libtool: install: /bin/install -c .libs/jpegtran.exe /usr/local/bin/jpegtran.exe
libtool: install: /bin/install -c .libs/rdjpgcom.exe /usr/local/bin/rdjpgcom.exe
libtool: install: /bin/install -c .libs/wrjpgcom.exe /usr/local/bin/wrjpgcom.exe
/bin/sh /home/pgg/jpeg-8d/install-sh -d /usr/local/include
/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
/bin/install -c -m 644 jerror.h jmorecfg.h jpeglib.h '/usr/local/include'
test -z "/usr/local/share/man/man1" || /bin/mkdir -p "/usr/local/share/man/man1"
/bin/install -c -m 644 cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1 '/usr/local/share/man/man1'
make[1]: Leaving directory `/home/pgg/jpeg-8d'
Code: Select all
pgg@g550 ~
$ ls /usr/local/include
jconfig.h jerror.h jmorecfg.h jpeglib.h
pgg@g550 ~
$ ls /usr/local/lib
libjpeg.a libjpeg.dll.a libjpeg.la
pgg@g550 ~
$ cd ImageMagick-6.8.1-9
pgg@g550 ~/ImageMagick-6.8.1-9
$ export CPPFLAGS="-I/usr/local/include"
pgg@g550 ~/ImageMagick-6.8.1-9
$ export LDFLAGS="-L/usr/local/lib"
pgg@g550 ~/ImageMagick-6.8.1-9
$ ./configure --without-perl
[...]
-------------------------------------------------------------
checking for JPEG...
checking jconfig.h usability... yes
checking jconfig.h presence... yes
checking for jconfig.h... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking jmorecfg.h usability... yes
checking jmorecfg.h presence... yes
checking for jmorecfg.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for JPEG library is version 6b or later... yes
checking if JPEG package is complete... yes
-------------------------------------------------------------
[...]
ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type: i686-pc-mingw32
Build system type: i686-pc-mingw32
Option Value
-------------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Module support --with-modules=no no
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=no no
Delegate Configuration:
BZLIB --with-bzlib=yes no
Autotrace --with-autotrace=no no
Dejavu fonts --with-dejavu-font-dir=default none
DJVU --with-djvu=yes no
DPS --with-dps=yes no
FFTW --with-fftw=yes no
FlashPIX --with-fpx=yes no
FontConfig --with-fontconfig=yes no
FreeType --with-freetype=yes no
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gswin32c (unknown)
Ghostscript fonts --with-gs-font-dir=default none
Ghostscript lib --with-gslib=no no
Graphviz --with-gvc=no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS v1 --with-lcms=yes no
LCMS v2 --with-lcms2=yes no
LQR --with-lqr=yes no
LTDL --with-ltdl=yes no
LZMA --with-lzma=yes no
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
PANGO --with-pango=yes no
PERL --with-perl=no no
PNG --with-png=yes no
RSVG --with-rsvg=no no
TIFF --with-tiff=yes no
WEBP --with-webp=yes no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=no no
X11 --with-x= no
XML --with-xml=yes no
ZLIB --with-zlib=yes no
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.8.1
CC = gcc -std=gnu99 -std=gnu99
CFLAGS = -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CPPFLAGS = -I/usr/local/include/ImageMagick -D_DLL -D_MT
PCFLAGS = -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -D_DLL -D_MT
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/usr/local/lib
MAGICK_LDFLAGS = -L/usr/local/lib -L/usr/local/lib
LIBS = -lMagickCore -ljpeg -lgdi32 -lm -lgomp -lpthread
CXX = g++
CXXFLAGS = -g -O2 -pthread
FEATURES = OpenMP
DELEGATES = mpeg jpeg ps
Code: Select all
pgg@g550 ~
$ ls /usr/local/include/ImageMagick
Magick++ Magick++.h magick wand
pgg@g550 ~
$ ls /usr/local/lib
ImageMagick-6.8.1 libMagick++-Q16.la libMagickCore-Q16.la libMagickWand-Q16.la libjpeg.la
libMagick++-Q16.a libMagickCore-Q16.a libMagickWand-Q16.a libjpeg.a pkgconfig
libMagick++-Q16.dll.a libMagickCore-Q16.dll.a libMagickWand-Q16.dll.a libjpeg.dll.a
Even with this shortest of test programs
Code: Select all
#include <stdio.h>
#include <wand/magick_wand.h>
#define ThrowWandException(wand) \
{ \
char *description; \
FILE *errfile; \
ExceptionType severity; \
errfile = fopen("error_log.txt", "a" ); \
description=MagickGetException(wand,&severity); \
(void) fprintf(errfile,"\n\n-----\n%s %s %lu %s\n",GetMagickModule(),description); \
description=(char *) MagickRelinquishMemory(description); \
fclose( errfile ); \
exit(-1); \
}
int main()
{
MagickWand *mw = NULL;
MagickWandGenesis();
mw = NewMagickWand();
if( mw == MagickFalse ) ThrowWandException(mw);
if( MagickReadImage(mw,"input.jpg") == MagickFalse ) ThrowWandException(mw);
if( MagickWriteImage(mw,"output.jpg") == MagickFalse ) ThrowWandException(mw);
if(mw) mw = DestroyMagickWand(mw);
MagickWandTerminus();
return 0;
}
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Supported image formats with MagickWand API
try
convert -list configure
and look at the line starting with DELEGATES. Does it include jpg or jpeg or libjpeg?
If not, then IM is not configure for jpg.
If so, then perhaps your file is corrupt or not a jpg? Can you post a link to it for the IM developers to examine?
try from the command line
convert image.jpg image.gif
does that work?
convert -list configure
and look at the line starting with DELEGATES. Does it include jpg or jpeg or libjpeg?
If not, then IM is not configure for jpg.
If so, then perhaps your file is corrupt or not a jpg? Can you post a link to it for the IM developers to examine?
try from the command line
convert image.jpg image.gif
does that work?
Re: Supported image formats with MagickWand API
Code: Select all
$ convert -list configure
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
convert.exe: unable to access configure file `configure.xml' @ warning/configure.c/GetConfigureOptions/616.
Thanks.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Supported image formats with MagickWand API
That is not good. But I don't know what to tell you other than to recompile IM.convert.exe: unable to access configure file `configure.xml' @ warning/configure.c/GetConfigureOptions/616.