Commit ab33621b authored by Kyle Robbertze's avatar Kyle Robbertze

Update upstream source from tag 'upstream/4.2.6'

Update to upstream version '4.2.6'
with Debian dir f3fcf7c6e6d6d39366467be0b0ce1eaa7e46a1e4
parents 152b6a35 be9623e8
repo: e37886d73a98029822983bee73a2d90ceb4b298b
node: e471b3c4470d1515267d42047085f7d7b5630502
branch: for_4.02
tag: 4.2.0
node: 8d714f02305a058f77f788a98e4f4876ea354511
branch: b4.2.6
tag: 4.2.6
......@@ -41,3 +41,4 @@ examples/tiffps/tiffps$
examples/ttfimg/ttfimg$
\.svn/
opam/generated
......@@ -7,3 +7,12 @@ c803efa9d5d33b908069f27f49b876e35853a708 v4.0.1
f650e32ed440423e2290e1ef819aecd8c99375bc 4.1.3
f650e32ed440423e2290e1ef819aecd8c99375bc 4.1.3
71025db891bd826fc1d608c2b52b8b9d3afdd218 4.1.3
e471b3c4470d1515267d42047085f7d7b5630502 4.2.0
447c5c72b04442f6a619a32c204417b79cd85e7b 4.2.1
fe7a86e872c7d1823328552f94bef6a7b79db399 4.2.3
12c4cc5db683a20dfc37b32193e7753385e45c9c 4.2.4
12c4cc5db683a20dfc37b32193e7753385e45c9c 4.2.4
13777ef409e7aadc8a6505c2c2592150117a5027 4.2.4
a4d7ac5682d2858098d9ca38c340613b60572166 4.2.5
a4d7ac5682d2858098d9ca38c340613b60572166 4.2.5
8ca76028cff3a5e9a9b26f0f364185d1cedb30ea 4.2.5
4.2.6
- Complation fix of tiffps for OCaml 4.06.0
4.2.5
- Ported to lablgtk.2.8.16
- Added cmxs creation
4.2.4
- -safe-string support
4.2.3
- compilation fix for homebrew
- compilation fix when there is no supported subpackages which
require external libraries
4.2.2
* Added some documents to mli files
* Fixed memory leaks in ftintf.c. Thanks to Max Mouratov!
* Fixed warning switches for OCaml 4.03.0
* .cmx files are now installed
4.2.1
* Load_only_the_first_frame load_option is added
* Fixes for 4.02.2 new warnings
4.2.0
* OCaml 4.02.0 string/bytes fix
......
......@@ -18,11 +18,12 @@ include OMyMakeroot
# For release, -warn-error should not be put
OCAMLFLAGS= -w A-4-9-40-42-44-45-37-41-48
# OCAMLFLAGS= -w A-4-9-35-37-40-41-42-44-45-48
OCAMLFLAGS= -w A-3-4-9-37-40-41-42-44-45-41-48-50 -safe-string
# For the development, -warn-error A is turned on
if $(file-exists DEV)
OCAMLFLAGS += -warn-error A
OCAMLFLAGS += -warn-error A-3
export
########################################## External arguments
......
open build/C
open build/OCaml
open build/LaTeX
DefineCommandVars()
.SUBDIRS: .
......@@ -188,6 +188,7 @@ SRCDIR = $(ROOT)/src
Subpackages_available(packs) =
sequence-forall($(fun elem, $(mem $(elem), core all_formats supported $(SUPPORTED_SUBPACKAGES))), $(packs))
# BUG: OCAMLINCLUDES, OCAML_LIBS and OCAMLPACKS are accumulated by multiple calls of BuildExample()
BuildExample(namex, modules, packages) =
.PHONY: clean
if $(Subpackages_available $(packages))
......
========================================================
CamlImages - Objective Caml image processing library
========================================================
The latest released version is 4.1.2.
========================================================
Note: This library is currently under development.
========================================================
What is CamlImages ?
========================================================
This is an image processing library, which provides some basic
functions of image processing and loading/saving various image file
formats. In addition the library can handle huge images that cannot be
(or can hardly be) stored into the memory (the library automatically
creates swap files and escapes them to reduce the memory usage).
Installation
========================================================
Read the file INSTALL.txt
CamlImages concepts
========================================================
Color models
--------------------------------------------------------
CamlImages supports the following color models:
* Rgb24 -- 24bit depth full color image
* Index8 -- 8bit depth indexed image with transparent information
* Index16 -- 16bit depth indexed image with transparent information
For each color models, the corresponding module is provided. Use the module
Rgb24 if you want to access 24bit depth full color images, for example.
Load/Save image files and other fancy features
--------------------------------------------------------
CamlImages supports loading and saving of the following file formats:
* Bitmap (.bmp)
* Tiff (.tiff or .tif), color only
* Jpeg (.jpeg or .jpg)
* Png (.png)
* Ppm (.pbm, .pgm, .ppm), portable pixmaps
* PS (.ps, .eps), PostScript files
* X Pixmap (.xpm), no saving
* Gif (.gif) (not recommended)
* EXIF tag
For each image format, we provide a separate module. For instance,
there is a Tiff module to load and save images stored in the tiff file
format.
If you do not want to specify the file format, you can use Image.load:
this function automatically analyses the header of the image file at hand
and loads the image into the memory, if the library supports this format.
CamlImages also provides an interface to the internal image format of
O'Caml's Graphics library (this way you can draw your image files into
the Graphics window).
You can also draw strings on images using the Freetype library, which
is an external library to load and render TrueType fonts.
Class interface
--------------------------------------------------------
The modules begins the letter 'o' are the class interface for CamlImages.
Image swap
--------------------------------------------------------
When you create/load a huge image, the computer memory may not be
sufficient to contain all the data. (For example, this may happen if
you are working with a scanned image of A4, 720dpi, 24bit fullcolor,
even if you have up to 128Mb of memory!)
(Well, my son, the first version of this document was written around 1998,
and computers had less memory at that time.)
To work with such huge
images, CamlImages provides image swaps, which can escape part of the
images into files stored on the hard disk. A huge image is thus
partitioned into several blocks and if there is not enough free
memory, the blocks which have not been accessed recently are swapped
to temporary files. If a program requests to access to such a swapped
block, the library silently loads it back into memory.
By default, image swapping is disabled, because it slows down the
programs. To activate this function, you have to modify
Bitmap.maximum_live and Bitmap.maximum_block_size. Bitmap.maximum_live
is the maximum heap live data size of the program (in words) and
Bitmap.maximum_block_size is the maximum size of swap blocks (in
words).
For example, if you do not want to use more than 10M words (that is
40Mb for a 32bit architecture or 80Mb for a 64bit architecture), set
Bitmap.maximum_live to 10000000. You may (and you should) enable heap
compaction, look at the GC interface file, gc.mli, in the standard
library for more details (you should change the compaction configuration).
Bitmap.maximum_block_size affects the speed and frequency of image
block swapping. If it is larger, each swapping becomes slower. If it
is smaller, more swappings will occur. Too large and too small
maximum_block_size, both may make the program slower. I suggest to
have maximum_block_size set to !Bitmap.maximum_live / 10.
If you activated image swapping, cache files for unused swapped
blocks will be removed automatically by Caml GC finalization,
but you may free them explicitly by hand also. The functions and methods
named "destroy" will free those blocks.
The swap files are usually created in the /tmp directory. If you
set the environment variable "CAMLIMAGESTMPDIR", then its value
replaces the default "/tmp" directory. The temporary files are erased
when the program exits successfully. In other situations, for instance
in case of spurious exception, you may need to erase temporary files
manually.
Use of CamlImages
====================================
OCamlFind
------------------------------------
Due to the library complexity, we recommend using OCamlFind.
You can get the list of related packages by::
$ ocamlfind list | grep camlimages
camlimages (version: 4.1.2)
camlimages.all (version: 4.1.2)
camlimages.all_formats (version: 4.1.2)
camlimages.core (version: 4.1.2)
camlimages.exif (version: 4.1.2)
camlimages.freetype (version: 4.1.2)
camlimages.gif (version: 4.1.2)
camlimages.graphics (version: 4.1.2)
camlimages.jpeg (version: 4.1.2)
camlimages.lablgtk2 (version: 4.1.2)
camlimages.png (version: 4.1.2)
camlimages.ps (version: 4.1.2)
camlimages.tiff (version: 4.1.2)
camlimages.xpm (version: 4.1.2)
After successful installation of CamlImages, you should see something similar above.
At compilation of your program, you should list the packages of image formats and GUI of you needs.
But if you are not sure which one is required, just use 'camlimages.all':
it contains everything. Normally your compilation command should look like::
$ ocamlfind ocamlc -c -package camlimages.all blah.ml
to compile a module using CamlImages, or to build an executable,::
$ ocamlfind ocamlc -linkpkg -package camlimages.all blah.ml
Basic image manipulation
--------------------------------------
We have a basic image manipulation modules for each image pixel type:
Index8, Index16, Rgb24, Rgba32 and Cmyk32. All they have the same interface
documented in Image_intf.IMAGE.
Image saving/loading
--------------------------------------
To save or load an image to some image format, use the corresponding module
for the image format. Jpeg, Gif, Png and so on.
Here is a simple code to create a 1x1 RGB24 image and save it to a jpeg file::
(* save it to sample.ml *)
let () =
let img = Rgb24.create 1 1 in
Rgb24.set img 0 0 { Color.r = 255; g = 0; b = 0 };
Jpeg.save "sample.jpg" [] (Images.Rgb24 img)
You should be able to compile it by::
$ ocamlfind ocamlc -linkpkg -package camlimages.all -o sample sample.ml
and "./sample" should create an image file "sample.jpg".
(To run the code correctly, your CamlImages must be compiled with JPEG library.)
Examples
--------------------------------------
Some one-ML-file examples are found in CamlImages source directory.
Here are some recommendations:
* examples/edgedetect : Good to learn basic image loading/saving and pixel color manipulation
* examples/imgstat : Image header check which is written in pure OCaml code.
* tests/test.ml : Various image load/save tests displaying them on OCaml's Graphics window.
* examples/gifanim : How to handle Gif animation frames and how to write LablGtk app
* examples/resize : Resizing image
You can normally compile them by::
$ ocamlfind ocamlc -linkpkg -package camlimages.all -o XXX XXX.ml
Some may just fail because some of required libraries are not found in your system.
Where to report issues?
==========================================================
https://bitbucket.org/camlspotter/camlimages/issues?status=new&status=open
Makefile
Makefile.in
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>CamlImages</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<P>Contact the authors <EM><A
HREF="mailto:jun.furuse@gmail.com">jun.furuse@gmail.com</A></EM> and
<EM><A HREF="mailto:Pierre.Weis@inria.fr">Pierre.Weis@inria.fr</A></EM>.
<BR>Created the 7th of February 2000.
<BR>Last update on Fri Oct 26 2009.
<H1 ALIGN=CENTER>CamlImages</H1>
<H1 ALIGN=CENTER>Version 3.0.2</H1>
<center><img src="fumicaml2-small.jpg"></center>
<H2 ALIGN=CENTER>Objective Caml image processing library</H2>
<P>
<EM>Note: this library is currently(=always) under development.</EM>
<center>
<a href="test.jpg"><img src="test-small.jpg"></a>
</center>
<H2 ALIGN=LEFT>0. What is CamlImages ?</H2>
<P> CamlImages is an image processing library, which provides
<UL>
<LI>Basic functions for image processing and loading/saving various image
file formats (hence providing a translation facility from format to format),
<LI>An interface with the Caml graphics library allows to display
images in the Graphics module screen and to mix them with Caml
drawings,
<LI>A <CODE>freetype</CODE> interface, integrated into the library:
you can draw texts into images using any <EM>truetype</EM> fonts.
</UL>
<P>In addition, the library can handle huge images that
cannot be (or can hardly be) stored into the main memory (the library
then automatically creates swap files and escapes them to reduce the
memory usage).
<P>Additional example programs are supplied in the
<CODE>examples</CODE> directory of the library:
<DL>
<DT><CODE>converter</CODE>:
<DD>a convertion program, that converts image from formats to formats.
<DT><CODE>crop</CODE>:
<DD>a ``cropping'' program, that cuts an image to its edges.<br>
<a href="crop.jpg"><img src="crop-icon.jpg"></A>
<DT><CODE>edgedetect</CODE>:
<DD>a program to detect edges into an image.<br>
<a href="edge.jpg"><img src="edge-icon.jpg"></A>
<DT> <CODE>gifanim</CODE>:
<DD>an animation program for <CODE>gif</CODE> encoded series of images.
<DT><CODE>liv</CODE>:
<DD>an extension of the Unix <CODE>ls</CODE> command
to view a set of images. (Also considered as a light version of
<CODE>xv</CODE> with nice slide show capabilities.)<br>
<a href="lvdemo.jpg"><img src="lvdemo-icon.jpg"></A>
<DT><CODE>monochrome</CODE>:
<DD>converts a color image to monochrome.
<DT><CODE>normalize</CODE>:
<DD>normalizes the colormap of an image. This
program anlyzes the colormap information of the image to normalize its
brightness over the full range available.
<DT><CODE>resize</CODE>:
<DD>a program to resize an image.
<DT><CODE>tiffps</CODE>:
<DD>a program to output a postscript version of a tiff image (for
instance to print it).
<DT><CODE>ttfimg</CODE>:
<DD>true type font dump program. It can be used to create fancy
banners or buttons.<br>
Try for instance <TT>ttfimg ../../test/micap.ttf -message Bonjour -fg red -bg
black</TT>. Visualize with <CODE>liv</CODE> (of course).
<CODE>ttfimg</CODE> also creates some sample images of true type fonts.
Try <TT>ttfimg -o sample_micap.jpg ../../test/micap.ttf</TT>.<br>
<a href="ttfimg.jpg"><img src="ttfimg-icon.jpg"></A>
</DL>
<H2 ALIGN=LEFT>1. Installation</H2>
<P>Get the <a href="camlimages-3.0.2.tgz">source tarball</a>,
decompress it,
and read the file <CODE><A HREF="INSTALL">INSTALL</A></CODE>.
<BR>You can also access the read-only
<A HREF="http://camlcvs.inria.fr/cgi-bin/cvsweb.cgi/bazar-ocaml/camlimages/">
CVS repository</A> which contains the latest developing (but not yet
released) version.
<H2 ALIGN=LEFT>2. Using CamlImages</H2>
<H3 ALIGN=LEFT>2.1 Color models</H3>
<P>CamlImages supports the following color models:
<UL>
<LI><CODE>Rgb24</CODE>: 24bit depth full color image.
<LI><CODE>Index8</CODE>: 8bit depth indexed image with transparent
information.
<LI><CODE>Index16</CODE>: 16bit depth indexed image with transparent.
<LI><CODE>Rgba32</CODE>: 32bit depth full color image, with the alpha channel.
<LI><CODE>Cmyk32</CODE>: 32bit Cyan Magenta Yellow and blacK image.
(Unfortunatelly, beautiful conversion between RGB and CMYK is not supported.)
</UL>
For each color model, a corresponding module is provided. For example,
use the module <CODE>Rgb24</CODE> if you want to access 24bit depth
full color images.
<H3 ALIGN=LEFT>2.2 Load/Save image files and other fancy features</H3>
<P>CamlImages supports loading and saving of the following file formats:
<UL>
<LI>Bitmap, windows bitmap format (.bmp).
<LI>Gif, graphics interchange format (.gif) (not recommended).
<LI>Jpeg, joint photographic experts group (.jpeg or .jpg).
<LI>Png, portable network graphics (.png).
<LI>Tiff, tagged image file format (.tiff or .tif). (Color only.)
<LI>X pixmaps (.xpm). (Loading only.)
<LI>Encapsulated Postscript (using ghostscript)
<LI>xv thumbnail files (see xvthumb directory).
</UL>
<P>For each image format, we provide a separate module. For instance,
use the <CODE>Tiff</CODE> module to load and save images stored in the tiff file
format.
<BR>If you do not want to specify the file format, you can use
<CODE>Image.load</CODE>: this function automatically analyses the
header of the image file at hand and loads the image into the memory,
if the library supports this format.
<P>CamlImages also provides an interface to the internal image format of
O'Caml's Graphics library (this way you can draw your image files into
the Graphics window).
<P>You can also draw strings on images using the Freetype library, which
is an external library to load and render TrueType fonts.
<H3 ALIGN=LEFT>2.3 Class interface</H3>
<P>The modules with names beginning with the letter 'o' contains the object
class interface for CamlImages.
<H3 ALIGN=LEFT>2.4 Image swap</H3>
<P> When you create/load a huge image, the computer memory may not be
sufficient to contain all the data. (For example, this may happen if
you are working with a scanned image of A4, 720dpi, 24bit fullcolor,
even if you have up to 128Mb of memory!) To work with such huge
images, CamlImages provides image swaps, which can escape part of the
images into files stored on the hard disk. A huge image is thus
partitioned into several blocks and if there is not enough free
memory, the blocks which have not been accessed recently are swapped
to temporary files. If a program requests to access to such a swapped
block, the library silently loads it back into memory.
<BR> By default, image swapping is disabled, because it slows down the
programs. To activate this function, you have to modify
<CODE>Bitmap.maximum_live</CODE> and
<CODE>Bitmap.maximum_block_size</CODE>:
<UL>
<LI><CODE>Bitmap.maximum_live</CODE>
is the maximum heap live data size of the program (in words)
<LI><CODE>Bitmap.maximum_block_size</CODE> is the maximum size of swap
blocks (in words).
</UL>
<BR> For example, if you do not want to use more than 10M words (that
is 40Mb for a 32bit architecture or 80Mb for a 64bit architecture),
set Bitmap.maximum_live to 10000000. You may (and you should) enable
heap compaction, look at the GC interface file, <CODE>gc.mli</CODE>, in the
standard library for more details (you should change the compaction
configuration).
<BR><CODE>Bitmap.maximum_block_size</CODE> affects the speed and frequency of
image block swapping. If it is larger, each swapping becomes
slower. If it is smaller, more swappings will occur. Too large and too
small <CODE>maximum_block_size</CODE>, both may make the program
slower. I suggest to have maximum_block_size set to
<CODE>!Bitmap.maximum_live / 10</CODE>.
<BR>If you activated image swapping, cache files for unused swapped
blocks will be removed automatically by Caml GC finalization,
but you may free them explicitly by hand also. The functions and methods
named "destroy" will free those blocks.
<BR>The swap files are usually created in the <CODE>/tmp</CODE>
directory. If you set the environment variable
<CODE>"CAMLIMAGESTMPDIR"</CODE>, then its value replaces the default
<CODE>"/tmp"</CODE> directory. The temporary files are erased when the
program exits successfully. In other situations, for instance in case
of spurious exception, you may need to erase temporary files manually.
<H2 ALIGN=LEFT>3. Miscellaneous</H2>
<H3 ALIGN=LEFT>3.1 Examples of use of the library ?</H3>
You can find some examples in the <CODE>examples</CODE> directory including
image auto-cropping, resizing and an image viewer with the lablgtk library.
<H3 ALIGN=LEFT>3.2 How do I organize my Makefile to use the library ?</H3>
Put the following line at the top of your Makefile:
<PRE>
include /usr/local/lib/ocaml/camlimages/Makefile.config
</PRE>
The library directory can be different, if the library is installed
somewhere else. The variables <CODE>COMPFLAGS_CAMLIMAGES</CODE> and
<CODE>LINKFLAGS_CAMLIMAGES</CODE> are defined in
<CODE>Makefile.config</CODE>; you should add them to the compiler and
linker options. A sample Makefile is available as
<CODE>sample/Makefile.sample</CODE>.
</BODY>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>CamlImages</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<P>Contact the authors <EM><A
HREF="mailto:jun.furuse@gmail.com">jun.furuse@gmail.com</A></EM> and
<EM><A HREF="mailto:Pierre.Weis@inria.fr">Pierre.Weis@inria.fr</A></EM>.
<BR>Created the 7th of February 2000.
<BR>Last update on Oct 26 2009.
<H1 ALIGN=CENTER>CamlImages</H1>
<H2 ALIGN=CENTER>Version @VERSION@</H2>
<center><img src="fumicaml2-small.jpg"></center>
<H2 ALIGN=CENTER>Objective Caml image processing library</H2>
<P>
<EM>Note: this library is currently(=always) under development.</EM>
<center>
<a href="test.jpg"><img src="test-small.jpg"></a>
</center>
<H2 ALIGN=LEFT>0. What is CamlImages ?</H2>
<P> CamlImages is an image processing library, which provides
<UL>
<LI>Basic functions for image processing and loading/saving various image
file formats (hence providing a translation facility from format to format),
<LI>An interface with the Caml graphics library allows to display
images in the Graphics module screen and to mix them with Caml
drawings,
<LI>A <CODE>freetype</CODE> interface, integrated into the library:
you can draw texts into images using any <EM>truetype</EM> fonts.
</UL>
<P>In addition, the library can handle huge images that
cannot be (or can hardly be) stored into the main memory (the library
then automatically creates swap files and escapes them to reduce the
memory usage).
<P>Additional example programs are supplied in the
<CODE>examples</CODE> directory of the library:
<DL>
<DT><CODE>converter</CODE>:
<DD>a convertion program, that converts image from formats to formats.
<DT><CODE>crop</CODE>:
<DD>a ``cropping'' program, that cuts an image to its edges.<br>
<a href="crop.jpg"><img src="crop-icon.jpg"></A>
<DT><CODE>edgedetect</CODE>:
<DD>a program to detect edges into an image.<br>
<a href="edge.jpg"><img src="edge-icon.jpg"></A>
<DT> <CODE>gifanim</CODE>:
<DD>an animation program for <CODE>gif</CODE> encoded series of images.
<DT><CODE>liv</CODE>:
<DD>an extension of the Unix <CODE>ls</CODE> command
to view a set of images. (Also considered as a light version of
<CODE>xv</CODE> with nice slide show capabilities.)<br>
<a href="lvdemo.jpg"><img src="lvdemo-icon.jpg"></A>
<DT><CODE>monochrome</CODE>:
<DD>converts a color image to monochrome.
<DT><CODE>normalize</CODE>:
<DD>normalizes the colormap of an image. This
program anlyzes the colormap information of the image to normalize its
brightness over the full range available.
<DT><CODE>resize</CODE>:
<DD>a program to resize an image.
<DT><CODE>tiffps</CODE>:
<DD>a program to output a postscript version of a tiff image (for
instance to print it).
<DT><CODE>ttfimg</CODE>:
<DD>true type font dump program. It can be used to create fancy
banners or buttons.<br>
Try for instance <TT>ttfimg ../../test/micap.ttf -message Bonjour -fg red -bg
black</TT>. Visualize with <CODE>liv</CODE> (of course).
<CODE>ttfimg</CODE> also creates some sample images of true type fonts.
Try <TT>ttfimg -o sample_micap.jpg ../../test/micap.ttf</TT>.<br>
<a href="ttfimg.jpg"><img src="ttfimg-icon.jpg"></A>
</DL>
<H2 ALIGN=LEFT>1. Installation</H2>
<P>Get the <A HREF="camlimages-@VERSION@.tgz">source
tar ball</A>, decompress it,
and read the file <CODE><A HREF="INSTALL">INSTALL</A></CODE>.
<BR>You can also access the read-only
<A HREF="http://camlcvs.inria.fr/cgi-bin/cvsweb.cgi/bazar-ocaml/camlimages/">
CVS repository</A> which contains the latest developing (but not yet
released) version.
<H2 ALIGN=LEFT>2. Using CamlImages</H2>
<H3 ALIGN=LEFT>2.1 Color models</H3>
<P>CamlImages supports the following color models:
<UL>
<LI><CODE>Rgb24</CODE>: 24bit depth full color image.
<LI><CODE>Index8</CODE>: 8bit depth indexed image with transparent
information.
<LI><CODE>Index16</CODE>: 16bit depth indexed image with transparent.
<LI><CODE>Rgba32</CODE>: 32bit depth full color image, with the alpha channel.
<LI><CODE>Cmyk32</CODE>: 32bit Cyan Magenta Yellow and blacK image.
(Unfortunatelly, beautiful conversion between RGB and CMYK is not supported.)
</UL>
For each color model, a corresponding module is provided. For example,
use the module <CODE>Rgb24</CODE> if you want to access 24bit depth
full color images.
<H3 ALIGN=LEFT>2.2 Load/Save image files and other fancy features</H3>
<P>CamlImages supports loading and saving of the following file formats:
<UL>
<LI>Bitmap, windows bitmap format (.bmp).
<LI>Gif, graphics interchange format (.gif) (not recommended).
<LI>Jpeg, joint photographic experts group (.jpeg or .jpg).
<LI>Png, portable network graphics (.png).
<LI>Tiff, tagged image file format (.tiff or .tif). (Color only.)
<LI>X pixmaps (.xpm). (Loading only.)
<LI>Encapsulated Postscript (using ghostscript)
<LI>xv thumbnail files (see xvthumb directory).
</UL>
<P>For each image format, we provide a separate module. For instance,
use the <CODE>Tiff</CODE> module to load and save images stored in the tiff file
format.
<BR>If you do not want to specify the file format, you can use
<CODE>Image.load</CODE>: this function automatically analyses the
header of the image file at hand and loads the image into the memory,
if the library supports this format.
<P>CamlImages also provides an interface to the internal image format of
O'Caml's Graphics library (this way you can draw your image files into
the Graphics window).
<P>You can also draw strings on images using the Freetype library, which
is an external library to load and render TrueType fonts.
<H3 ALIGN=LEFT>2.3 Class interface</H3>
<P>The modules with names beginning with the letter 'o' contains the object
class interface for CamlImages.
</