<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Module gif_sh</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body bgcolor="white">
<h1>Module gif_sh</h1>
Create GIF images from raw graphic data.<ul><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul><h2><a name="description">Description</a></h2>Create GIF images from raw graphic data. GIF images may be
constructed from either a full color rastermap with 3 bytes per
pixel, from a greyscale rastermap with one byte per pixel, or from
a user supplied colormap with a rastermap of indexes into the color
map.<p> </p>
One option is supported, which defines an index or color to be
treated as transparent. If this option is used a GIF89a image will
be created, otherwise a GIF87a image will be created.
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1"><tr><td valign="top"><a href="#create-5">create/5</a></td><td>Create a GIF image from a user supplied color map and a binary
of image data with one byte per pixel which indexes into the color
map.</td></tr>
<tr><td valign="top"><a href="#grey8-3">grey8/3</a></td><td>Create a GIF image consisting only of greyscale colors.</td></tr>
<tr><td valign="top"><a href="#grey8-4">grey8/4</a></td><td>Create a GIF image consisting of greyscale colors with options.</td></tr>
<tr><td valign="top"><a href="#rgb8-3">rgb8/3</a></td><td>Create a GIF image from source data where each pixel consists
of 3 bytes arranged in RGB order.</td></tr>
<tr><td valign="top"><a href="#rgb8-4">rgb8/4</a></td><td>Create a GIF image from source data where each pixel consists
of 3 bytes arranged in RGB order.</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3><a name="create-5">create/5</a></h3>
<p><tt>create(Width::integer(), Height::integer(), Data::binary(), Color_map::binary, Opts::Opts) -> <a href="#type-io_list">io_list()</a></tt>
<ul><li><tt>Opts = [{transparent, integer()}]</tt></li></ul></p>
<p>Create a GIF image from a user supplied color map and a binary
of image data with one byte per pixel which indexes into the color
map. <p> </p>
Available options are:
<ul>
<li> {transparent, Index} - Make the color Index transparent </li>
</ul>
The color map is simply a binary with all the RGB values appended
together (of the form
<<R1,G1,B1,R2,G2,B2,R3,G3,B3>>). Index 0 is the
first color, Index 1 the second color and so on.
</p>
<h3><a name="grey8-3">grey8/3</a></h3>
<p><tt>grey8(Width::integer(), Height::integer(), Data::binary()) -> <a href="#type-io_list">io_list()</a></tt></p>
<p>Create a GIF image consisting only of greyscale colors. White
is 255 and Black is 0
</p>
<h3><a name="grey8-4">grey8/4</a></h3>
<p><tt>grey8(Width::integer(), Height::integer(), Data::binary(), Opts::Opts) -> <a href="#type-io_list">io_list()</a></tt>
<ul><li><tt>Opts = [{transparent, integer()}]</tt></li></ul></p>
<p>Create a GIF image consisting of greyscale colors with options. White
is 255 and Black is 0. Allowed options are:
<ul>
<li> {transparent, Index} - Make the greyscale color Index transparent </li>
</ul>
</p>
<h3><a name="rgb8-3">rgb8/3</a></h3>
<p><tt>rgb8(Width::integer(), Height::integer(), Data::binary()) -> <a href="#type-io_list">io_list()</a></tt></p>
<p>Create a GIF image from source data where each pixel consists
of 3 bytes arranged in RGB order. The RGB triples should
be ordered starting from the top left of the image going left to
right for each scanline in turn<p> </p>
Width * Height * 3 must equal the number of bytes in the image data<p> </p>
The image may not contain more than 255 different colors</p>
<h3><a name="rgb8-4">rgb8/4</a></h3>
<p><tt>rgb8(Width::integer(), Height::integer(), Data::binary(), Opts::Opts) -> <a href="#type-io_list">io_list()</a></tt>
<ul><li><tt>Opts = [{transparent, binary()}]</tt></li></ul></p>
<p>Create a GIF image from source data where each pixel consists
of 3 bytes arranged in RGB order. The RGB triples should
be ordered starting from the top left of the image going left to
right for each scanline in turn<p> </p>
Width * Height * 3 must equal the number of bytes in the image data<p> </p>
The only allowed option is {transparent, <<R,G,B>>} in which case
all pixels with color R,G,B will be defined as transparent.</p>
</body>
</html>