<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Images</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">
<LINK REL="STYLESHEET" HREF="running.css">
<LINK REL="next" HREF="node4_mn.html"> <LINK REL="previous" HREF="node2_mn.html"> <LINK REL="up" HREF="node1_mn.html"> <LINK REL="next" HREF="node4_mn.html"> </HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">
<H1><A ID="SECTION00120000000000000000"> Images</A> </H1>
<P> The end result of running is an image file. Depending upon how it was installed, writes images in either the Utah Raster <EM>RLE</EM> format or a generic but easily-manipulated <EM>mtv</EM> format used by Mark VandeWettering in his <EM>mtv</EM> ray tracer. The <EM>mtv</EM> format consists of a header giving the resolution of the image followed by interleaved red-green-blue values for each pixel. The <EM>RLE</EM> format supports an arbitrary number of color channels, an alpha channel, comments, a history field, and the ability to treat images as windows into a larger image. As a result of this flexibility, a number of 's features are not supported if the <EM>mtv</EM> format is being used. You are thus strongly encouraged to obtain a copy of the Utah Raster Toolkit.
<P> If the <EM>mtv</EM> format is used, the image will (and must) consist of three eight-bit color channels. If the <EM>RLE</EM> format is used, the image file consists of three eight-bit color channels plus an eight-bit alpha channel. also documents in the <EM>RLE</EM> header the command line and <EM>gamma</EM> value used in creating the image.
<P> If more than one frame is rendered, the resulting images are appended in turn to the image file. The various utilities provided by the Utah Raster Toolkit can be used to manipulate the resulting ``movie'' files. If the Toolkit is not being used, you will probably need to write utility programs to handle the decidedly non-standard multi-image <EM>mtv</EM> format files.
<P> By default, writes the computed image to the standard output. The image file may be written to a file instead by specifying a file name in the input stream.
<P>
<BR>
<IMG
STYLE="height: 196.25ex; vertical-align: -0.57ex; " SRC="img1.png"
ALT="
">
<BR>
The output file name may also be specified on the command line by
using the <TT>-O</TT> option.
<P> The size of the output image is measured in pixels. The <EM>x</EM> size is the number of pixels left-to-right, while the <EM>y</EM> size is the number of pixels bottom-to-top.
<P>
<BR>
<IMG
STYLE="height: 2.17ex; vertical-align: 176.68ex; " SRC="img2.png"
ALT="
">
<BR>
The screen size may also be set on the command line through
the <TT>-R</TT> option.
The default
screen size is 512 by 512 pixels.
<P> When rendering an image, it is often advantageous to split the image into a number of disjoint windows, each of which is rendered on a different machine. One then combines the images corresponding to the windows into a final image.
<P>
<BR>
<IMG
STYLE="height: 2.10ex; vertical-align: 176.68ex; " SRC="img3.png"
ALT="
">
<BR>
The window must be properly
contained within the screen, i.e., <EM>minx</EM> and <EM>miny</EM> must
be greater than or equal to zero, while <EM>maxx</EM> and
<EM>maxy</EM> must be less than <EM>xsize</EM> and <EM>ysize</EM>, respectively.
The Utah Raster tool
<EM>rlecomp</EM> is useful for reconstructing the full image from
sub-images.
By default, the window
is equivalent to the entire screen.
<P> It is also convenient to be able to render a small portion of the window by specifying a subregion using normalized coordinates.
<P>
<BR>
<IMG
STYLE="height: 2.10ex; vertical-align: 176.68ex; " SRC="img4.png"
ALT="
">
<BR>
The rendering window is cropped by rendering the screen
area that falls within <!– MATH
minx + left(maxx - minx)
–>
<I>minx</I> + <I>left</I>(<I>maxx</I> - <I>minx</I>) and
<!– MATH
minx + right(maxx - minx)
–>
<I>minx</I> + <I>right</I>(<I>maxx</I> - <I>minx</I>) in the <I>X</I> direction, and similarly
for the <I>Y</I> direction.
<EM>Left</EM> and <EM>bottom</EM> must be greater than or equal to zero.
<EM>Right</EM> and <EM>top</EM> must be less than or equal to one.
If <EM>left</EM> is greater than <EM>right</EM>, the two values are
swapped, and similarly for <EM>bottom</EM> and <EM>top</EM>.
<P> <EM>Gamma correction</EM> may also be applied to the three output color channels. See Appendix A for more details.
<P>
<HR>
</BODY> </HTML>