Page 1 of 1

Problem encountered during resizing.

Posted: 2014-02-06T16:45:09-07:00
by helloworld
Hello,

I am trying to resize a image with the following command,

convert /tmp/PP_qfl7QW -verbose -strip -resize 200x200 -quality 99 -density 72x72 -units pixelsperinch /tmp/PP_bNI5iq

and its giving me a error like below,

convert: no decode delegate for this image format `/tmp/PP_qfl7QW' @ error/constitute.c/ReadImage/555.

I am not sure what does this mean? Am i missing any delegates?

Version which i installed on my machine is,

Version: ImageMagick 6.8.8-2 Q16 x86_64 2014-01-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff x xml zlib

Re: Problem encountered during resizing.

Posted: 2014-02-06T17:03:49-07:00
by snibgo
This means it can't figure out what type of image is in the file "/tmp/PP_qfl7QW". What type of image is it? Can you see it in an image viewer? What happens with:

Code: Select all

identify /tmp/PP_qfl7QW

Re: Problem encountered during resizing.

Posted: 2014-02-06T17:11:57-07:00
by helloworld
when i do, identify /tmp/PP_qfl7QW,
It says identify: no decode delegate for this image format `/tmp/PP_qfl7QW' @ error/constitute.c/ReadImage/555.

Re: Problem encountered during resizing.

Posted: 2014-02-06T17:13:41-07:00
by fmw42
I don't think it is a good idea to try to work with unlabeled tmp images from IM or anywhere else in your /tmp directory. If you need to work with it, first copy it out of the tmp directory and add its actual suffix as user snibgo has indicated. In any case, for IM, it is likely in MIFF format.

Re: Problem encountered during resizing.

Posted: 2014-02-06T17:14:34-07:00
by helloworld
What we are doing is,

When ever a person uploads a original image, we are storing that image in tmp folder as PP_cbgdt56ty and we are converting that tmp file to different dimensions..

Re: Problem encountered during resizing.

Posted: 2014-02-06T17:16:53-07:00
by fmw42
I would not store it in /tmp, but in some special directory for your use. Other tools may leave files there. Eventually you may need to purge /tmp. Furthermore, it clogs up the directory with your working files and provides less room for IM and other functions to work.

Re: Problem encountered during resizing.

Posted: 2014-02-06T17:18:51-07:00
by snibgo
So you don't know if it is a corrupt image or something malicious. As IM doesn't recognise it as an image, I suggest you treat it as junk.