PiRSquared17 / cing

Automatically exported from code.google.com/p/cing
0 stars 0 forks source link

convert and montage doesn't work with ps files in Mac and Linux for AWSS #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
convert fig1.png fig2.png fig.gif # works
convert fig.ps fig.gif # fig.ps multi-page doc, fig.gif is only first page

Same happens with montage.

Systems and versions:

Mac OS 10.4.11 Tiger
Version: ImageMagick 6.4.1 05/22/08 Q16

Ubuntu Linux 8.04
Version: ImageMagick 6.3.7 02/19/08 Q16 

Possible solution: split multi-page ps in several figs and convert/montage as 
done for whatif 
figs.

Jurgen, can you confirm that you don't have this issue? Then I can work in this 
fix.

Original issue reported on code.google.com by alanwil...@gmail.com on 5 Jun 2008 at 5:51

GoogleCodeExporter commented 9 years ago
Go ahead and attach your input to this issue and I'll spin it. 
My test case that works is in CINGROOT/Tests/data/pc_nmr_11_rstraints.ps

Original comment by jurge...@gmail.com on 6 Jun 2008 at 7:18

GoogleCodeExporter commented 9 years ago
So trying at $CINGROOT/Tests/data/:

convert -delay 200 pc_nmr_11_rstraints.ps test.gif

And I got a 2s long animation with just 1 page showing.

I am attaching a file for you to test.

Original comment by alanwil...@gmail.com on 6 Jun 2008 at 8:35

Attachments:

GoogleCodeExporter commented 9 years ago
do you get a nicely rotated pinup gif and a montaged from this example by: 
the Libs/test/test_Imagery.py code?
I changed the code recently to not rotate the larger gif and instead montage to 
a
large png.

Original comment by jurge...@gmail.com on 6 Jun 2008 at 8:40

GoogleCodeExporter commented 9 years ago
My comments bellow in {}:

Amadeus[2426]:~/workspace/cingWork% python python/cing/Libs/test/test_Imagery.py
DEBUG:==> Executing (/sw/bin/montage -geometry +10+10   
/Users/alan/workspace/cingWork/Tests/data/imagery/residuePlotSetAll001.png 
/Users/alan/workspace/cingWork/Tests/data/imagery/residuePlotSetAll002.png 
/tmp/cing/residuePlotSetAll.png)
montage: unable to read font `/Library/Fonts/Microsoft/Arial'.

{ I got a nice montaged 2 pages in one}

DEBUG:==> Executing (/sw/bin/convert -delay 200 -geometry 102 
/Users/alan/workspace/cingWork/Tests/data/pc_nmr_11_rstraints.ps 
/tmp/cing/pc_nmr_11_rstraints_pin.gif)
{ No animated gif }

DEBUG:==> Executing (/sw/bin/montage -geometry +10+10   -density 144 
/Users/alan/workspace/cingWork/Tests/data/pc_nmr_11_rstraints.ps 
/tmp/cing/pc_nmr_11_rstraints.png) ... 
montage: unable to read font `/Library/Fonts/Microsoft/Arial'.

{ No montaged, just 1st page, it should be 2}

DEBUG:==> Executing (/sw/bin/ps2pdf14  
/Users/alan/workspace/cingWork/Tests/data/pc_nmr_11_rstraints.ps 
/tmp/cing/pc_nmr_11_rstraints.pdf)

{ OK }

DEBUG:Got back from convert2Web output file names: 
('/tmp/cing/pc_nmr_11_rstraints_pin.gif', '/tmp/cing/pc_nmr_11_rstraints.png', 
'/tmp/cing/pc_nmr_11_rstraints.pdf')
DEBUG:==> Executing (/sw/bin/gs -dNOPAUSE -sDEVICE=pdfwrite 
-sOUTPUTFILE=pc_nmr_11_rstraints_echo.pdf -dBATCH  pc_nmr_11_rstraints.pdf 
pc_nmr_11_rstraints.pdf > /dev/null 2>&1)

{ Opening 'pc_nmr_11_rstraints_echo.pdf' and I see a 4 pages documents 
(pc_nmr_11_rstraints.pd echoed) rotated: I think it's OK, right? }
----------------------------------------------------------------------
Ran 2 tests in 7.617s

The same happens in Linux for me. I suspect it's a bug in imagemagick and 
cannot find any reference on Google.
The bottom line issue is: for me, convert nor montage are able to see interpret 
a multi-page ps file as a multi-image file.

And you know what's weird: if instead of ps I use a multi-page tiff or pdf, 
convert and montage works nicely.

Alternatives:
use the pdf file as source instead of pdf to generate the animated gif and 
montaged pages?

Are you using imagemagick from Fink? which version?
fink describe imagemagick 
     imagemagick-6.4.1-1002
dpkg -l imagemagick
     6.4.1-1002
convert -version
     ImageMagick 6.4.1 05/22/08

Original comment by alanwil...@gmail.com on 6 Jun 2008 at 11:04

GoogleCodeExporter commented 9 years ago
jd:Stella/~/ fink list Image | grep '(i)'
(i) imagemagick 6.4.0-1001  Image manipulation tools
(i) imagemagick10-shlibs    1:6.3.5-1007    Image manipulation tools, old version
so you are one level up from me. Perhaps install the shlibs?
Could it be a dependency on another tool, like ghostscript. Below are all my 
fink
packages.

jd:Stella/~/ fink list | grep '(i)'
(i) apr-dev 0.9.12-14   Apache Portable Runtime
(i) aprutil-dev 0.9.12-14   Apache Portable Runtime
(i) autoconf    2.62-1  System for generating configure scripts
(i) bash-completion 20060301-3  Command-line completions for bash
(i) boost-jam   3.1.16-1    Extension of Perforce Jam make replacement
(i) cairo   1.4.14-3    Vector graphics library
(i) cairo-shlibs    1.4.14-3    Vector graphics library
(i) cmake   2.4.8-1 Cross-platform Make
(i) cvs2svn-py25    2.0.1-12    Python modules for cvs2svn (Python 2.5)
(i) daemonic    20010902-4  Interface to daemon init scripts
(i) dbus-dev    1.0.2-1028  Message bus system for applications
(i) dbus-shlibs 1.0.2-1028  Message bus system for applications
(i) fftw3   3.1.2-1 Discrete Fourier Transform Lib (Ver 3)
(i) fftw3-shlibs    3.1.2-1 Discrete Fourier Transform Lib (Ver 3)
(i) fontconfig2-dev 2.4.1-104   Font configuration library
(i) fontconfig2-shlibs  2.4.1-104   Fontconfig 2, shared libs (dummy)
(i) gcc42   4.2.3-1000  GNU Compiler Collection Version 4.2
(i) gcc42-shlibs    4.2.3-1000  Shared libraries for gcc4
(i) ghostscript 8.61-5  Interpreter for PostScript and PDF
(i) imagemagick 6.4.0-1001  Image manipulation tools
(i) imagemagick10-shlibs    1:6.3.5-1007    Image manipulation tools, old version
(i) ipython-py25    0.8.2-1 Replacement interactive Python interpreter
(i) libapr0-shlibs  0.9.12-14   Apache Portable Runtime
(i) libaprutil0-shlibs  0.9.12-14   Apache Portable Runtime
(i) libdjvulibre15-dev  3.5.20-1001 Free viewer for DjVu files
(i) libdjvulibre15-shlibs   3.5.20-1001 Free viewer for DjVu files
(i) libmpfr1    2.3.1-1 C library for floating-point computation
(i) libmpfr1-shlibs 2.3.1-1 Shared libraries for mpfr package
(i) libpng3 1:1.2.29-1  PNG image format handling library
(i) libpng3-shlibs  1:1.2.29-1  Shared libraries for libpng3 package
(i) libtool14   1.5.26-2    Shared library build helper, v1.5
(i) libtool14-shlibs    1.5.26-2    Shared libraries for libtool, v1.5
(i) m4  1.4.11-1    Advanced macro processing language
(i) netpbm-bin  10.26.53-1  Graphics manipulation programs and libraries
(i) netpbm10-shlibs 10.26.53-1  Graphics manipulation programs and libraries
(i) numarray-py25   1.5.2-2 Multidim'l numerical arrays for Python (Numeric 
successor)
(i) ocaml   3.10.2-1    Latest implementation of Caml dialect of ML
(i) pygtk2-gtk-py25 2.6.3-2 Python bindings for the GTK widget set
(i) pygtk2-gtk-py25-dev 2.6.3-2 Tools for compiling against pygtk2
(i) python25    1:2.5.2-1   Interpreted, object-oriented language
(i) python25-shlibs 1:2.5.2-1   Interpreted, object-oriented language
(i) python25-socket 1:2.5.1-3   Obsolete socket plugin for python
(i) scipy-py25  1:0.6.0-6   Scientific tools for Python
(i) sdl 1.2.13-1    Cross-platform multimedia library
(i) sdl-shlibs  1.2.13-1    Cross-platform multimedia library
(i) t1lib5-nox  5.1.2-1 Generates bitmaps from Type 1 fonts
(i) t1lib5-nox-shlibs   5.1.2-1 Shared libs for generating Type 1 Font bitmaps
(i) t1lib5-x11  5.1.2-1 Generates bitmaps from Type 1 fonts
(i) t1lib5-x11-shlibs   5.1.2-1 Shared libs for generating Type 1 Font bitmaps
(i) tcltk   8.4.16-4    Tool Command Language and the Tk toolkit
(i) tcltk-dev   8.4.16-4    Tool Command Language and the Tk toolkit
(i) tcltk-shlibs    8.4.16-4    Tool Command Language and the Tk toolkit
(i) texinfo 4.11-1001   Texinfo documentation system
(i) tomcat5 5.5.26-1    Java Servlet 2.4 Container and Web Server
(i) tomcat5-webapps 5.5.26-1    Java Servlet 2.4 Container and Web Server
(i) vtk-py25    5.0.4-2 The Visualization ToolKit
(i) vtkdata 5.0.4-1 Data for VTK
(i) wget    1.11.2-1    Automatic web site retriever (SSL)
(i) xml-simple-pm588    2.18-1  Trivial API for reading and writing XML

Original comment by jurge...@gmail.com on 6 Jun 2008 at 11:31

GoogleCodeExporter commented 9 years ago
Did you get this to work now?

Original comment by jurge...@gmail.com on 26 Jun 2008 at 10:56

GoogleCodeExporter commented 9 years ago
No, not working gif animated.

If instead of ps I use a multi-page tiff or pdf, convert and montage works 
nicely.

Original comment by alanwil...@gmail.com on 10 Jul 2008 at 4:02

GoogleCodeExporter commented 9 years ago
Besides, your Fink is definitely different of mine (you Leopard, right?). The 
command fink list | grep '(i)' has to be 
different for me:
fink list| grep '^ i'

And I have all packages I believe I would need.

I am trying on Ubuntu... last status was 'not working' either.

Original comment by alanwil...@gmail.com on 10 Jul 2008 at 4:10

GoogleCodeExporter commented 9 years ago
what do you mean with 'not working' 
What isn't working?

Original comment by jurge...@gmail.com on 10 Jul 2008 at 5:45

GoogleCodeExporter commented 9 years ago
Imagemagick from Fink for Tiger 10.4.11 is not ok when converting multi-page ps 
(post script) file to 
animated gif (also problems with montage)

    imagemagick                         6.4.1-1002
    imagemagick1-shlibs          6.4.1-1002

Solution:
Download 
http://www.imagemagick.org/download/binaries/ImageMagick-universal-apple-
darwin8.11.0.tar.gz
and install as described in:
http://www.imagemagick.org/script/binary-releases.php#macosx

I contacted Imagemagick Fink maintainer and hope this will be fixed in future 
releases.

Original comment by alanwil...@gmail.com on 17 Jul 2008 at 10:20