Difference between revisions of "Conversion between different image file formats"

From CUC3
Jump to navigation Jump to search
import>Csw34
import>Em427
 
(3 intermediate revisions by one other user not shown)
Line 7: Line 7:
 
convert image.ppm image.ps
 
convert image.ppm image.ps
   
There are some conversion tools installed on the clusters, and the best way to find them is simply to type the file extension you are converting from i.e. ''.pdf'' followed by ''2'' and then press ''TAB'' to display the possible options e.g.
+
There are some conversion tools installed on the clusters, and the best way to find them is simply to type the file extension you are converting from i.e. '.pdf' followed by '2' and then press ''TAB'' to display the possible options e.g.
   
 
pdf2 <TAB>
 
pdf2 <TAB>
 
gives:
 
gives:
 
pdf2dsc pdf2ps
 
pdf2dsc pdf2ps
which means we can use the tool ''pdf2ps'' to convert our ''.pdf'' file into a Postscript file by using:
+
which means we can use the tool ''pdf2ps'' to convert our '.pdf' file into a Postscript (''.ps'') file by using:
 
pdf2ps paper.pdf paper.ps
 
pdf2ps paper.pdf paper.ps
  +
  +
It is also worth trying the file extension followed by 'to' as well! This can be extremely useful when it comes to printing files.
  +
  +
dvi output from LaTeX can be converted to pdf or ps using:
  +
  +
dvips paper.dvi
  +
  +
or
  +
  +
dvipdf paper.dvi

Latest revision as of 17:23, 1 May 2008

The convert command is an extremely powerful way of changing an image into a different format, or modifying it in ways you never thought possible! It is only available on workstations (as far as I can tell) so you'd first have to copy the file you wanted to copy there using scp.

For a full list of the possible options, type the following in a workstation shell:

convert -help

For example, to convert a .ppm file into a Postscript (.ps) file you could just use

convert image.ppm image.ps

There are some conversion tools installed on the clusters, and the best way to find them is simply to type the file extension you are converting from i.e. '.pdf' followed by '2' and then press TAB to display the possible options e.g.

pdf2 <TAB>

gives:

pdf2dsc  pdf2ps

which means we can use the tool pdf2ps to convert our '.pdf' file into a Postscript (.ps) file by using:

pdf2ps paper.pdf paper.ps

It is also worth trying the file extension followed by 'to' as well! This can be extremely useful when it comes to printing files.

dvi output from LaTeX can be converted to pdf or ps using:

dvips paper.dvi

or

dvipdf paper.dvi