可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I'm trying to convert an image with imagemagick, but I'm getting this error:
convert: no decode delegate for this image format `//i.imgur.com/nTheJ.jpg' @ error/constitute.c/ReadImage/532.
I'm doing this:
convert http://i.imgur.com/nTheJ.jpg -resize 600×600 filarkiv/billeder/produkter/s236-085145.jpg
I have the following delegates:
DELEGATES freetype jpeg jng mpeg png x11 xml zlib
Anyone knows what the problem is?
回答1:
substitude the ×
in -resize 600×600
with a capital X
and it should work.
-resize 600X600
回答2:
I had this error when rendering an image using DragonFly in Rails. This happened after I upgraded to Lion (ImageMagick was installed using Brew).
I reinstalled ImageMagick, jpeg, libtiff and jasper (reinstalling ImageMagick wasn't enough by itself).
brew uninstall imagemagick jpeg libtiff jasper brew install imagemagick
Prior to that, running
identify -list format
and jpeg wasn't in the list. After reinstalling the above packages jpeg appeared in the list.
回答3:
for me:
brew reinstall imagemagick --with-libtiff
saved the day when dealing with a similar problem, but for tiff files.
UPDATE: one year later and this remains the only way I can get tiff working properly in convert on MacOS X.
回答4:
I faced the same problem recently. After Googling for couple of hours, I found out that reason was a CONFLICT between php extentions Gmagick & Imagick. Commenting gmagick.so in php.ini fixed the problem. Hope this will save someone time :)
回答5:
from Phillip Ingram somewhere on the interwebs:
in gentoo use
sudo EXTRA_ECONF="--with-png --with-jpeg" emerge imagemagick"
This is slightly different than Jonathan Horseman's answer since it wasn't an error but rather a need to specify more during the installation.
But the identify command was very useful.
Hope this helps someone (and perhaps me in the future ;).
回答6:
In my case, the solution was a matter of ending the command with *.{jpg,png}
rather than *
.
I believe the *
was picking up / trying to convert hidden files.
回答7:
redhat4.8, If you install from source, may be can try:
yum remove libjpeg
wget http://www.imagemagick.org/download/delegates/jpegsrc.v9a.tar.gz
sudo tar xvf jpegsrc.v9a.tar.gz -C /usr/local/src/
cd /usr/local/src/jpeg-9a
./configure --enable-shared
make
sudo make install
than turn in ImageMagick
cd ImageMagick-6.9.6-4
./configure
sudo make install
sudo ldconfig /usr/local/lib
回答8:
I have encountered a similar problem with TIFF files on ImageMagick v7.0.4-5 on Windows 7.
If this question concerns a Windows OS, then the cause is that Windows can't find the Jpeg (in my case, TIFF) file library (DLL).
Cause
I had installed ImageMagick without adding it to the Windows $PATH
.
Error message
This resulted in error
identify: unable to load module 'C:\Program Files\ImageMagick-7.0.4-Q16\modules\coders\IM_MOD_RL_TIFF_.dll': The specified module could not be found. @ error/module.c/OpenModule/1279. identify: no decode delegate for this image format `TIFF' @ error/constitute.c/ReadImage/509.
Solution
- Re-install ImageMagick and do add it to the
$PATH
, so that it can find libtiff
. Restart your command shell as well. - First
cd
into ImageMagick's install folder before executing it.