从IFF和EXR格式到JPEG格式的图像转换

时间:2015-01-23 12:50:59

标签: imagemagick imagemagick-convert

我正在使用convert Desktop/iff_image.iff Desktop/iff_image.jpg将我的图片转换为JPEG格式。

但是得到了

convert: no decode delegate for this image format `Desktop/iff_image.iff' @ error/constitute.c/ReadImage/552.
convert: no images defined `Desktop/iff_image.jpg' @ error/convert.c/ConvertImageCommand/3127.

对于.tif,.tiff,.cin,.dpx扩展,它正常工作。

问题只出现在.iff和.exr扩展名上。

1 个答案:

答案 0 :(得分:3)

IFF

我不熟悉名为' IFF'的格式。很抱歉对这个没有帮助......

EXR

为了支持读写EXR格式,您的ImageMagick安装需要......

  1. ...访问OpenEXR库(也必须安装在您的系统上);
  2. ...构建时支持OpenEXR 委托
  3. 在ImageMagick中,'代表'是外部程序或帮助程序实用程序,它们支持ImageMagick处理它自己无法处理的格式。

    ImageMagick中最常见的代理之一是 Ghostscript 。 Ghostscript需要处理PDF或PostScript输入文件,因为ImageMagick只能处理栅格格式。因此,Ghostscript代表ImageMagick将PDF和PS转换为光栅图像,然后将这些栅格数据移交给IM,然后执行其余的工作。

    要打印所有内置委托的列表,请运行此命令(在Linux或Mac OS X上):

    convert -version | grep Delegates
    

    相应的Windows命令是:

    convert -version | findstr Delegates
    

    我在系统上看到的关于此命令的输出是:

    Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig \
                          jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png   \
                          ps rsvg tiff webp wmf x xml zlib
    

    受支持的代表列表中应包含openexr个。如果不存在,则需要安装具有该版本的ImageMagick。

    要检查已使用哪些编译时选项来构建您的ImageMagick版本,请运行

     convert -list configure
    

    如果开始DELEGATES的亚麻布未列出openexr,则系统的二进制包尚未考虑使用OpenEXR构建。如果列出了 ,但仍无法正常工作,则其他错误...

    在我的系统上,我看到了:

    Path: /opt/local/lib/ImageMagick-6.9.0//config-Q16/configure.xml
    
    Name           Value
    -------------------------------------------------------------------------------
    CC             /usr/bin/clang
    CFLAGS         -I/opt/local/include/lqr-1 -I/opt/local/include/glib-2.0 \
                   -I/opt/local/lib/glib-2.0/include -I/opt/local/include \
                   -I/opt/local/include/freetype2 -I/opt/local/include \
                   -I/opt/local/include/libpng16 -pipe -Os -arch x86_64 \
                   -Wall -march=corei7-avx -fexceptions -D_FORTIFY_SOURCE=0 \
                   -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 \
                   -DMAGICKCORE_QUANTUM_DEPTH=16
    CODER_PATH     /opt/local/lib/ImageMagick-6.9.0/modules-Q16/coders
    CONFIGURE      ./configure  '--prefix=/opt/local' '--enable-shared' \
                      '--enable-static' '--disable-ltdl-install' \
                      '--disable-silent-rules' '--with-frozenpaths' \
                      '--with-openexr' '--disable-hdri' '--with-dps' \
                      '--with-bzlib' '--with-djvu' '--with-fontconfig' \
                      '--with-gslib' '--with-jbig' '--with-jpeg' '--with-lcms' \
                      '--with-openjp2' '--with-png' '--with-tiff' '--with-webp' \
                      '--with-zlib' '--with-modules' '--with-xml' \
                      '--without-perl' '--without-fpx' '--with-wmf' \
                      '--with-gvc' '--with-rsvg' '--with-lqr' '--with-pango' \
                      '--with-x' '--with-gs-font-dir=/opt/local/share/fonts/urw-fonts' \
                      'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' \
                      'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names \
                      -arch x86_64' 'CPPFLAGS=-I/opt/local/include' \
                      'CXX=/usr/bin/clang++' 'CXXFLAGS=-pipe -Os -arch x86_64 \
                      -stdlib=libc++'
    CONFIGURE_PATH /opt/local/etc/ImageMagick-6/
    COPYRIGHT      Copyright (C) 1999-2014 ImageMagick Studio LLC
    CPPFLAGS       -I/opt/local/include/ImageMagick-6
    CXX            /usr/bin/clang++
    CXXFLAGS       -pipe -Os -arch x86_64 -stdlib=libc++ -D_THREAD_SAFE -pthread
    DEFS           -DHAVE_CONFIG_H
    DELEGATES      bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms \
                   lqr lzma openexr openjp2 pango png ps rsvg tiff webp wmf x xml zlib
    DISTCHECK_CONFIG_FLAGS 'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' \
                   'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/clang++' \
                   'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names \
                    -arch x86_64' --disable-deprecated --with-quantum-depth=16 \
                    --with-jemalloc=no --with-umem=no --with-autotrace=no \
                    --with-fpx=no --with-fontpath= --with-gs-font-dir=/opt/local/share/fonts/urw-fonts \
                    --with-perl=no
    DOCUMENTATION_PATH /opt/local/share/doc/ImageMagick-6
    EXEC-PREFIX    /opt/local
    EXECUTABLE_PATH /opt/local/bin
    FEATURES       DPC Modules
    FILTER_PATH    /opt/local/lib/ImageMagick-6.9.0/modules-Q16/filters
    HOST           x86_64-apple-darwin13.4.0
    INCLUDE_PATH   /opt/local/include/ImageMagick-6
    LDFLAGS        -L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names \
                   -arch x86_64 -L/opt/local/lib -L/opt/local/lib
    LIB_VERSION    0x690
    LIB_VERSION_NUMBER 6,9,0,0
    LIBRARY_PATH   /opt/local/lib/ImageMagick-6.9.0
    LIBS           -llcms2 -L/opt/local/lib -lfreetype -L/opt/local/lib -llqr-1 \
                   -lglib-2.0 -lintl -lfftw3 -L/opt/local/lib -lfontconfig -lfreetype \
                   -lXext -lSM -lICE -lX11 -lXt -L/opt/local/lib -llzma -lbz2 -lz \
                   -lltdl -lm
    NAME           ImageMagick
    PCFLAGS        -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
    PREFIX         /opt/local
    QuantumDepth   16
    RELEASE_DATE   2014-12-06
    SHARE_PATH     /opt/local/share/ImageMagick-6
    SHAREARCH_PATH /opt/local/lib/ImageMagick-6.9.0/config-Q16
    SVN_REVISION   17068
    TARGET_CPU     x86_64
    TARGET_OS      darwin13.4.0
    TARGET_VENDOR  apple
    VERSION        6.9.0
    WEBSITE        http://www.imagemagick.org
    
    Path: [built-in]
    
    Name           Value
    ----------------------------------------------------------------------------
    FEATURES       
    NAME           ImageMagick
    QuantumDepth   16