Page 1 of 2

thumbnails are not generated when converting eps to png

Posted: 2013-11-20T12:30:36-07:00
by gk_imagemagic
Hi Team,
Our applications(CMS) have been running on Linux operating system and also we have integrated ImageMagick to convert the eps file to png files.Here the conversion is happening but we are not able to see thumbnails for converted ones.When we run the command - identify tmp/ADVAIR_DISKUS_250.eps we are getting message like "identify: no decode delegate for this image format `tmp/ADVAIR_DISKUS_250.eps' @ error/constitute.c/ReadImage/552."And also this issue is not coming for all the eps files this is coming for some of the files only.Can someone suggest what could be the reason not to see the thumbnails for the converted eps to png files.

Thanks In Advance.

-Kishore

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-20T12:59:50-07:00
by snibgo
identify tmp/ADVAIR_DISKUS_250.eps we are getting message like "identify: no decode delegate for this image format `tmp/ADVAIR_DISKUS_250.eps' @ error/constitute.c/ReadImage/552."
Identify can't read the file and determine its format. Perhaps the file is bad. Can you post an example somewhere like dropbox.com and paste the URL here?

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-20T13:10:38-07:00
by gk_imagemagic
For the same file, In windows environment we are not seeing any issue while converting and also able to view generated thumbnails.Sorry,i could not send the file.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-20T13:24:14-07:00
by fmw42
I believe, though am not 100% sure, that eps needs the ghostscript delegate for processing. Perhaps your two systems have different versions of ghostscript. You might check the versions and upgrade if that is needed.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-20T13:54:51-07:00
by gk_imagemagic
Added additional info.

ImageMagick Vers : ImageMagick-6.8.6

Operating System : RHEL 6.4.

When we run the command covert -list delegate,below are the list of commands response.

Delegate Command
-------------------------------------------------------------------------------
blender => "blender" -b "%i" -F PNG -o "%o""\n"convert" -concatenate "%o*.png" "%o"
cdr => "uniconvertor" "%i" "%o.svg"; mv "%o.svg" "%o"
cgm => "ralcgm" -d ps -oC < "%i" > "%o" 2> "%Z"
dng:decode => "ufraw-batch" --silent --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i"
dot => "dot" -Tsvg "%i" -o "%o"
dvi => "dvips" -q -o "%o" "%i"
eps<=>pdf "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i"
eps<=>ps "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pswrite" "-sOutputFile=%o" "-f%i"
fig => "fig2dev" -L ps "%i" "%o"
hpg => "hp2xx" -q -m eps -f `basename "%o"` "%i"; mv -f `basename "%o"` "%o"
hpgl => "hp2xx" -q -m eps -f `basename "%o"` "%i"; mv -f `basename "%o"` "%o"
htm => "html2ps" -U -o "%o" "%i"
html => "html2ps" -U -o "%o" "%i"
https => "curl" -s -k -o "%o" "https:%M"
ilbm => "ilbmtoppm" "%i" > "%o"
jxr => "mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.pnm"; mv "%i.jxr" "%i"; mv "%o.pnm" "%o"
man => "groff" -man -Tps "%i" > "%o"
miff<= show "display" -delay 0 -window-group %[group] -title "%l " "ephemeral:%i"
mpeg:decode => "ffmpeg" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z"
pdf<=>eps "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=epswrite" "-sOutputFile=%o" "-f%i"
pdf<=>ps "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pswrite" "-sOutputFile=%o" "-f%i"
plt => "echo" "set size 1.25,0.62; set terminal postscript portrait color solid; set output \'%o\'; load \'%i\'" > "%u";"gnuplot" "%u"
pnm<= ilbm "ppmtoilbm" -24if "%i" > "%o"
pnm<= jxr "mv "%i" "%i.pnm"; "" -i "%i.pnm" -o "%o.jxr"; mv "%i.pnm" "%i"; mv "%o.jxr" "%o"
pnm<= wdp "mv "%i" "%i.pnm"; "" -i "%i.pnm" -o "%o.jxr"; mv "%i.pnm" "%i"; mv "%o.jxr" "%o"
pov => "povray" "+i%i" -D0 "+o%o" +fn%q +w%w +h%h +a -q9 "-kfi%s" "-kff%n";"convert" -concatenate "%o*.png" "%o"
ps<=>eps "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=epswrite" "-sOutputFile=%o" "-f%i"
ps<=>pdf "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i"
ps<= print "lpr "%i"
rgba<= rle "rawtorle" -o "%o" -v "%i"
scan => "scanimage" -d "%i" > "%o"
scanx => "scanimage" > "%o"
shtml => "html2ps" -U -o "%o" "%i"
sid => "mrsidgeodecode" -if sid -i "%i" -of tif -o "%o" > "%u"
svg => "rsvg-convert" -o "%o" "%i"
tiff<= launch "gimp" "%i"
txt<=>ps "enscript" -o "%o" "%i"
wdp => "mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.pnm"; mv "%i.jxr" "%i"; mv "%o.pnm" "%o"
wmf => "wmf2eps" -o "%o" "%i"

If the ghost script which comes along with ImageMagick set -up is not supporting ,can we get ghost script separately and install it?Will this solve the problem.
Will this solve problem

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-20T14:10:58-07:00
by fmw42
I do not know. But that list does not identify the ghostscript version. You need to identify that on your systems to see if they are the same and recent.

On unix, I can issue the following command at a terminal window and get the ghostscript version

gs --version
9.06

I do not know about Windows.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-20T15:14:44-07:00
by snibgo
"gs --version" also works on Windows, and reports 8.71 for me. However, running ...

Code: Select all

convert -verbose a1.eps a.png
... shows that IM finds a more recent version, 9.07 for me.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T08:58:34-07:00
by gk_imagemagic
If i understand correctly,this seems to be problem with ghostscript which comes along with the imagemagick set-up,so is it acceptable to install the ghostscript separately use with the currently installed one.

Suggest me please.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T10:48:23-07:00
by fmw42
It is not clear whether the issue is GS or your system. How did you install IM? From binary, from source? Was GS already on your system? What version of GS do you have? Do you even have GS. Can you provide a link to your eps file? What was the exact command line you used?

What do you get from

convert -list configure | grep "DELEGATES"

or from

convert -version

Does it list gslib?

What do you get from

gs --version

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T13:09:41-07:00
by gk_imagemagic
We installed IM binary set-up and we are using command covert abc.eps abc.png.And our GS version is GPL Ghostscript 8.70 and sorry i could not send that problematic eps files.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T13:14:29-07:00
by fmw42
What do you get from

convert -list configure | grep "DELEGATES"

or from

convert -version

Does it list gslib?

Do you know for sure that there is only one version of IM and one version of GS on your system?

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T13:20:22-07:00
by gk_imagemagic
We have only one instance of GS and IM. Below is our delegate.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE delegatemap [
<!ELEMENT delegatemap (delegate)+>
<!ELEMENT delegate (#PCDATA)>
<!ATTLIST delegate decode CDATA #IMPLIED>
<!ATTLIST delegate encode CDATA #IMPLIED>
<!ATTLIST delegate mode CDATA #IMPLIED>
<!ATTLIST delegate spawn CDATA #IMPLIED>
<!ATTLIST delegate stealth CDATA #IMPLIED>
<!ATTLIST delegate thread-support CDATA #IMPLIED>
<!ATTLIST delegate command CDATA #REQUIRED>
]>
<!--
Delegate command file.

Commands which specify

decode="in_format" encode="out_format"

specify the rules for converting from in_format to out_format These
rules may be used to translate directly between formats.

Commands which specify only

decode="in_format"

specify the rules for converting from in_format to some format that
ImageMagick will automatically recognize. These rules are used to
decode formats.

Commands which specify only

encode="out_format"

specify the rules for an "encoder" which may accept any input format.

For delegates other than ps:*, pcl:*, and mpeg:* the substitution rules are
as follows:

%i input image filename
%o output image filename
%u unique temporary filename
%Z unique temporary filename
%# input image signature
%b image file size
%c input image comment
%g image geometry
%h image rows (height)
%k input image number colors
%l image label
%m input image format
%p page number
%q input image depth
%s scene number
%w image columns (width)
%x input image x resolution
%y input image y resolution

Set option delegate:bimodal=true to process bimodal delegates otherwise they
are ignored.

If stealth="True" the delegate is not listed in user requested
"-list delegate" listings. These are typically special internal delegates.

If spawn="True" ImageMagick will not way for the delegate to finish,
nor will it read any output image. It will only wait for either the input
file to be removed (See "ephemeral:" coder) indicating that the input file
has been read, or a maximum time limit of 2 seconds.
-->
<delegatemap>
<delegate decode="autotrace" stealth="True" command=""convert" "%i" "pnm:%u"\n"autotrace" -input-format pnm -output-format svg -output-file "%o" "%u""/>
<delegate decode="blender" command=""blender" -b "%i" -F PNG -o "%o""\n"convert" -concatenate "%o*.png" "%o""/>
<delegate decode="browse" stealth="True" spawn="True" command=""xdg-open" http://www.imagemagick.org/; rm "%i""/>
<delegate decode="cdr" command=""uniconvertor" "%i" "%o.svg"; mv "%o.svg" "%o""/>
<delegate decode="cgm" thread-support="False" command=""ralcgm" -d ps -oC < "%i" > "%o" 2> "%Z""/>
<delegate decode="dng:decode" command=""ufraw-batch" --silent --create-id=also --out-type=png --out-depth=16 "--output=%u.png" "%i""/>
<delegate decode="dot" command='"dot" -Tsvg "%i" -o "%o"' />
<delegate decode="dvi" command=""dvips" -q -o "%o" "%i""/>
<delegate decode="edit" stealth="True" command=""xterm" -title "Edit Image Comment" -e vi "%o""/>
<delegate decode="eps" encode="pdf" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>
<delegate decode="eps" encode="ps" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pswrite" "-sOutputFile=%o" "-f%i""/>
<delegate decode="fig" command=""fig2dev" -L ps "%i" "%o""/>
<delegate decode="hpg" command=""hp2xx" -q -m eps -f `basename "%o"` "%i"; mv -f `basename "%o"` "%o""/>
<delegate decode="hpgl" command=""hp2xx" -q -m eps -f `basename "%o"` "%i"; mv -f `basename "%o"` "%o""/>
<delegate decode="htm" command=""html2ps" -U -o "%o" "%i""/>
<delegate decode="html" command=""html2ps" -U -o "%o" "%i""/>
<delegate decode="https" command=""curl" -s -k -o "%o" "https:%M""/>
<delegate decode="ilbm" command=""ilbmtoppm" "%i" > "%o""/>
<delegate decode="jxr" command="mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.pnm"; mv "%i.jxr" "%i"; mv "%o.pnm" "%o""/>
<delegate decode="wdp" command="mv "%i" "%i.jxr"; "JxrDecApp" -i "%i.jxr" -o "%o.pnm"; mv "%i.jxr" "%i"; mv "%o.pnm" "%o""/>
<delegate decode="man" command=""groff" -man -Tps "%i" > "%o""/>
<delegate decode="miff" encode="show" spawn="True" command=""display" -delay 0 -window-group %[group] -title "%l " "ephemeral:%i""/>
<delegate decode="miff" encode="win" stealth="True" spawn="True" command=""display" -immutable -delay 0 -window-group %[group] -title "%l " "ephemeral:%i""/>
<delegate decode="mpeg:decode" command=""ffmpeg" -v -1 -i "%i" -vframes %S -vcodec pam -an -f rawvideo -y "%u.pam" 2> "%Z""/>
<delegate decode="pcl:cmyk" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="pcl:color" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="pcl:mono" stealth="True" command=""pcl6" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="pdf" encode="eps" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=epswrite" "-sOutputFile=%o" "-f%i""/>
<delegate decode="pdf" encode="ps" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pswrite" "-sOutputFile=%o" "-f%i""/>
<delegate decode="plt" command=""echo" "set size 1.25,0.62; set terminal postscript portrait color solid; set output \'%o\'; load \'%i\'" > "%u";"gnuplot" "%u""/>
<delegate decode="pnm" encode="ilbm" mode="encode" command=""ppmtoilbm" -24if "%i" > "%o""/>
<delegate decode="pnm" encode="jxr" command="mv "%i" "%i.pnm"; "" -i "%i.pnm" -o "%o.jxr"; mv "%i.pnm" "%i"; mv "%o.jxr" "%o""/>
<delegate decode="pnm" encode="wdp" command="mv "%i" "%i.pnm"; "" -i "%i.pnm" -o "%o.jxr"; mv "%i.pnm" "%i"; mv "%o.jxr" "%o""/>
<delegate decode="pov" command=""povray" "+i%i" -D0 "+o%o" +fn%q +w%w +h%h +a -q9 "-kfi%s" "-kff%n";"convert" -concatenate "%o*.png" "%o""/>
<delegate decode="ps:alpha" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="ps:cmyk" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="ps:color" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pnmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="ps" encode="eps" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=epswrite" "-sOutputFile=%o" "-f%i""/>
<delegate decode="ps" encode="pdf" mode="bi" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pdfwrite" "-sOutputFile=%o" "-f%i""/>
<delegate decode="ps" encode="print" mode="encode" command="lpr "%i""/>
<delegate decode="ps:mono" stealth="True" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "-f%s" "-f%s""/>
<delegate decode="rgba" encode="rle" mode="encode" command=""rawtorle" -o "%o" -v "%i""/>
<delegate decode="scan" command=""scanimage" -d "%i" > "%o""/>
<delegate decode="scanx" command=""scanimage" > "%o""/>
<delegate decode="shtml" command=""html2ps" -U -o "%o" "%i""/>
<delegate decode="sid" command=""mrsidgeodecode" -if sid -i "%i" -of tif -o "%o" > "%u""/>
<delegate decode="svg" command=""rsvg-convert" -o "%o" "%i""/>
<delegate decode="svg:decode" stealth="True" command=""inkscape" "%s" --export-png="%s" --export-dpi="%s" --export-background="%s" --export-background-opacity="%s" > "%s" 2>&1"/>
<delegate decode="tiff" encode="launch" mode="encode" command=""gimp" "%i""/>
<delegate decode="txt" encode="ps" mode="bi" command=""enscript" -o "%o" "%i""/>
<delegate decode="wmf" command=""wmf2eps" -o "%o" "%i""/>
<delegate decode="xps:cmyk" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=bmpsep8" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="xps:color" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=ppmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate decode="xps:mono" stealth="True" command=""gxps" -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pbmraw" -dTextAlphaBits=%u -dGraphicsAlphaBits=%u "-r%s" %s "-sOutputFile=%s" "%s""/>
<delegate encode="mpeg:encode" stealth="True" command=""ffmpeg" -v -1 -i "%M%%d.jpg" "%u.%m" 2> "%Z""/>
</delegatemap>

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T13:22:21-07:00
by fmw42
The delegates.xml file does not identify whether IM actually finds GS. To do that you need to run the commands I suggested above.

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T13:29:45-07:00
by fmw42
Also can you provide the exact command you used to make your thumbnails from the eps file?

Re: thumbnails are not generated when converting eps to png

Posted: 2013-11-21T13:49:52-07:00
by snibgo
Another hint: try converting the eps file with "-verbose" to look at the gs command.