\begindata{text,538609936}
\textdsversion{12}
\template{help}
\define{global
}
\define{index
menu:[Title,Index~91]
attr:[FontFace Italic Int Set]}
\define{indexi
menu:[Title,InvisibleIndex~92]
attr:[Script PreviousScriptMovement Point -2]
attr:[FontFace Italic Int Set]}
\chapter{Convertraster: Changing raster formats}


\section{What is Convertraster?}


\leftindent{Convertraster is a program which lets you convert rasters from one 
format to another.  It reads a specified \bold{infile}, generates an internal 
representation of the raster, processes it as specified by the switches in 
your command, and writes the result in an \bold{outfile}.  


The raster formats you can convert between are:

\leftindent{
}}\description{\leftindent{\leftindent{\bold{MacPaint } the format produced by 
MacPaint (can be abbreviated mp, macp)

\bold{RF}  the old ITC binary RasterFile format  (can be abbreviated RF, 
rasterfile, ras) 

\bold{raster}  the Andrew Toolkit raster format  (can be abbreviated raster, 
be2)

\bold{PostScript}  print data stream (can be abbreviated ps); supported only 
for output

\bold{Xwindow} the X Window Dump format produced by xwd (can be abbreviated 
xwd)

\bold{Xbitmap} the X bitmap format as used in the creation of icons etc.

}}}
\section{Using Convertraster}


\leftindent{Convertraster has the following syntax:}


\leftindent{\description{convertraster [-ruln] [-c'(x,y,w,h)'] 
[-p\italic{scale]} [intype=\italic{type}] [infile=\italic{filename}] 
[outtype=\italic{type}]  [outfile=\italic{filename}]}}



\leftindent{For example, to convert a Andrew Toolkit raster format file called 
"background.raster" to an old ITC RasterFile format file called 
"background.ras", you would type the following command (on a single line):


\description{convertraster intype=be2 infile=background.raster outtype=ras 
outfile=background.ras}


}\leftindent{It is important to follow the command conventions:


1)  You must type the proper "switch" (intype=, infile=, outtype=, or 
outfile=) in front of each such argument you provide.  Omitting the switches 
will result in an error message.  However, the presence of the switches means 
you can give these four arguments in any order.  You can omit an argument 
entirely under certain circumstances, described below for each argument.


2)  Do not put carriage returns into your command.  The generic command and 
example are shown here on two lines only for reasons of space.


3)  Do not put brackets [like these] in your command; they are used in the 
command above to indicate that the arguments are optional under certain 
circumstances.  


4)  Capitalization is irrelevant, except in filenames.


5)  Do not put spaces between switches and their arguments.  (Like intype = 
mp.)


}\leftindent{The switches and flags have the following meanings:}

 \leftindent{

}\leftindent{\bold{-r}	  Rotates the image 90 degrees clockwise.  Multiple r's 
rotate 180, 270, and so on.


\bold{-u}	  Reflects the image across horizontal axis (swaps up and down). 


\bold{-l}	  Reflects the image across vertical axis (swaps left and right).


\bold{-n}	  Creates negative image by making black pixels white and white 
pixels black.

\leftindent{
You can combine these optional switches in a single list, as in -nrr, which 
produces a negative image rotated 180 degrees.

}
\description{\bold{\bold{-c'(x,y,w,h)'}}  Crops the input raster to the 
subimage of width \bold{w} and height \bold{h}, starting at the point that is 
(\bold{x}, \bold{y}) from the upper left corner (0, 0) of the raster. All four 
specifications are expressed in number of pixels.  Include the single quotes 
to facilitate processing.\bold{

}}
\leftindent{Cropping is optional and is done before the other processing. }


\bold{-p}\italic{scale }Scale postscript output by this factor (1.0 by 
default).


\bold{intype} is the format of the file you want to convert.  You may omit 
this argument if the type is \bold{\italic{RF}} (old RasterFile format) or 
\italic{\bold{raster}} (Andrew Toolkit format).  Otherwise, the type must 
correspond to the extension on the \bold{infile }argument.


\bold{outtype} is the format you want to convert to.  You may omit this 
argument if you want to generate an Andrew Toolkit format image, the default. 
 Otherwise, the type must correspond to the extension on the \bold{outfile} 
argument. 


\bold{infile} is the name of the file you want to convert.  If you omit an 
infile specification, standard input is read. The extension on the filename 
must correspond to the \bold{intype} argument:


\leftindent{.raster	for Andrew Toolkit (be2) format

.ras	for old RasterFile format

.mp	for MacPaint format

.xwd 	for X Window Dump format}


\bold{outfile} is the name of the file in which you want to save the converted 
raster.  If you omit an outfile specification, standard output is written. 
 The extension on the filename must match the \bold{outtype} argument: 


\leftindent{.raster		 for Andrew Toolkit (be2) format

.ras		for old RasterFile format

.mp		for MacPaint format

.xwd		for X Window Dump format

.bitmap	for X bitmap format.

.ps		for Postscript

}}
\section{Bugs}


\leftindent{Does not infer \bold{outtype} from the extension on 
\bold{outfile}, nor \bold{intype} from the extension on \bold{infile}.


Does not handle Sun raster formats.


Some users get "pixelimage not found" error message.}


\section{Program Author

}
\leftindent{Wilfred J. Hansen

}
\section{Related Tools}


Select (highlight) one of the italicized names and choose "Show Help on 
Selected Word" from the pop-up menu to see the help file for:


\leftindent{\italic{\helptopic{ez}

}\italic{\helptopic{raster}}\italic{

\helptopic{scan}

\helptopic{xwd}

}}

\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,516,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,538609936}
