Hi Hassan,

It seems the scripting language of the Gimp has changed a bit since
the version I used at the time of writing that script. The Gimp is
also only used for conversion of the xpm to png, which it did better
than convert. The important parts for recoloring are the lines using
convert, first generating a gradient, then applying that gradient on a
grayscale image. Try to find another way to convert xpm  to png (or
another lossless format), and modify the script to your needs.

Cheers,

Tsjerk

On Thu, Dec 16, 2010 at 4:19 AM, Hassan Shallal <hshal...@pacific.edu> wrote:
> Dear Gromacs users,
>
> I have been trying to use the recolor.sh mentioned in this wbsite 
> http://nmr.chem.uu.nl/~tsjerk/course/molmod/analysis1.html 
> <http://nmr.chem.uu.nl/~tsjerk/course/molmod/analysis1.html>
> to reclor an xpm file called rmsd-matrix.xpm file, whenever I issue the 
> command recolor.sh rmsd-matrix.xpm, I get the following error message:
>
> #$ hassan~ $./recolor.sh rmsd-matrix.xpm
> GIMP-Error: Opening '/home/hshallal/(gimp-file-save 1 1 2 "./rmsd-matrix.png" 
> "./rmsd-matrix.png")' failed: No such file or directory
> GIMP-Error: Opening '/home/hshallal/(gimp-quit 0)' failed: No such file or 
> directory
> batch command: executed successfully
>
> It seems like a problem with gimp not being able to process as stated in the 
> script, especially with the argument of "(gimp-file-save 1 1 2 \"$png\" 
> \"$png\")" (look below for the contents of the script).
>
> I have gimp confidured in my system. has anyone ran across the same problem 
> or can know what the problem is and what th solution might be?
>
> Thanks in advance
>
> Hassan
>
> The contents of the recolor.sh file:
>
> #!/bin/sh
>
> xpm=$1
> png=`dirname $xpm`/`basename $xpm .xpm`.png
> convert xc:red xc:orange xc:yellow xc:green1 xc:cyan xc:blue xc:magenta \
>          +append -filter Cubic -resize 600x30\! -rotate 90 
> gradient_rainbow.jpg
> #convert -size 1x600 xc:'#0C0' -colorspace HSB \
> #          gradient: -compose CopyRed -composite \
> #          -colorspace RGB gradient_rainbow.jpg
> gimp -d -f -i -b "(gimp-file-load 1 \"$xpm\" \"$xpm\")" "(gimp-file-save 1 1 
> 2 \"$png\" \"$png\")" "(gimp-quit 0)"
> convert $png gradient_rainbow.jpg -virtual-pixel edge -fx 'v.p{0,u*v.h}' $png
>
>
> --
> gmx-users mailing list    gmx-us...@gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at 
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-requ...@gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands
--
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to