没有连接code委托该图像格式@错误/ constitute.c / WriteImage / 1153 [英] no encode delegate for this image format @ error/constitute.c/WriteImage/1153

查看:594
本文介绍了没有连接code委托该图像格式@错误/ constitute.c / WriteImage / 1153的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用回形针,ImagMagick,Rmagick,亚马逊S3

I'm using Paperclip, ImagMagick, Rmagick, Amazon-s3

我收到越来越从URL后自定义缩放图像替换更改过的图像到Amazon图像时出现此错误。

I'm getting this error when getting an image from url and after custom resizing image replacing the changed image to amazon.

难懂:: ImageMagickError(无连接code代表该图像格式<$c$c>//s3.amazonaws.com/beu-dev/temp_images/final_images/000/000/377/original/template_37720121205-5921-99989h.png' @错误/ constitute.c / WriteImage / 1153):   应用程序/模型/ temp_image.rb:38:在写 线#38是最后一行这个方法结束前

Magick::ImageMagickError (no encode delegate for this image format //s3.amazonaws.com/beu-dev/temp_images/final_images/000/000/377/original/template_37720121205-5921-99989h.png' @ error/constitute.c/WriteImage/1153): app/models/temp_image.rb:38:inwrite' line#38 is last line before end of this method

def reprocess_final_image
    image_file_url = self.final_image.url(:original).split('?')[0]
    thumb = Magick::Image.read(image_file_url).first
    thumb.format = "PNG"
    thumb.crop_resized!(240,200, Magick::NorthWestGravity)
    **thumb.write(image_file_url)** ***Line#38***
  end

注:还有一件事这code工作完全使用系统文件系统时,却开始使用Amazon S3的错误发生时

Note: One more thing This code works perfectly when using system file system, but when started using amazon s3 Error happening

推荐答案

问题解决了。
1.检查确定-list格式

Issue solved.
1. Check "identify -list format"

如果你没有看到 .JPEG格式在列表中。然后,你需要添加的 .JPEG库

If you don't see the .jpeg format in the list. Then you need to add the .jpeg library.


卷曲-O http://www.ijg.org/文件/ jpegsrc.v8c.tar.gz

tar zxvf jpegsrc.v8c.tar.gz
cd jpeg-8c/
./configure
make

须藤使安装
现在,重新安装 ImageMagick的,然后一切正常了。

Sudo make install
Now reinstall imagemagick then everything works fine now.

这篇关于没有连接code委托该图像格式@错误/ constitute.c / WriteImage / 1153的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆