RMagick README               18 February 2003
=============================================

This package is RMagick 1.1.0.

RMagick is an interface between the Ruby programming language and the
ImageMagick image processing library.

Disclaimer: this software is not the "RubyMagick" software distributed
by Ryuichi Tamura, nor is it derived from that software. That package
is available at http://www.acc.ne.jp/~tam/RubyMagick/.

Contact information
-------------------

The author of RMagick is Tim Hunter. My email address is
cyclists@nc.rr.com. Please use that email address to report bugs,
ask questions, or just to let me know you're using RMagick!

Prerequisites
-------------

You must be running either Linux, cygwin, or FreeBSD. This version of RMagick
does not run on MS Windows except with cygwin.

You must have Version 1.6.7 or later of Ruby. If you do not have
Ruby, you can get it from www.ruby-lang.org. You must have 
ImageMagick 5.5.1 or later. If you have not already installed this
version of ImageMagick, you can get it from www.imagemagick.org.

ImageMagick uses additional libraries to support some image formats. If
you do not install those libraries you cannot read and write those
image formats. See the README.txt file in the ImageMagick source
distribution package for more information.

By default, the install program assumes you have the necessary authority
to install RMagick into the usual Ruby library directories.

Windows Metafile format
-----------------------
To support images in the Windows Metafile format, ImageMagick requires
an additional library. Without this library some of the RMagick
sample programs will not work. ImageMagick requires libwmf 0.2.5,
0.2.7, or 0.2.2 to support the WMF format. (Avoid libwmf 0.2.6!)

For more information, see the ImageMagick README.txt file.

Installing
----------

     THE INSTALLATION PROCEDURE HAS CHANGED. PLEASE
    READ THE FOLLOWING INSTRUCTIONS BEFORE BEGINNING.

De-compress the RMagick-1.0.1.tar.gz archive and enter the top
directory. Then type:

    $ ./configure
    $ ruby install.rb config
    $ ruby install.rb setup
   ($ su)
    # ruby install.rb install

You can also install files into your favorite directory by supplying
install.rb some options. Try "ruby install.rb --help".

During installation, all links in the RMagick documentation that link to the
ImageMagick web site are replaced with links to your local copies of the
ImageMagick documentation. Usually this is the /usr/local/share/ImageMagick
directory. If you want to specify a different location, use the --imdoc-base-uri
option during the config step to specify a different base URI for the links.
By default the base URI is "file:///$prefix/share/ImageMagick" (where $prefix is
the prefix you used when you installed ImageMagick) or, if the configure script
doesn't find the documentation in that directory, "http://www.imagemagick.org".

For example,

    ruby install.rb config --imdoc-base-uri=file:///home/user/ImageMagick

    
Uninstalling
------------
To uninstall RMagick,
    1. Delete $prefix/lib/ruby/site_ruby/1.x/RMagick.rb
       where $prefix is the prefix you used when installing, and 1.x
       is the Ruby release (either 1.6 or 1.8).
    2. Delete $prefix/lib/ruby/site_ruby/1.x/$arch/RMagick.so
       where $arch is the architecture code, i.e. i686-linux.
    3. Delete the $prefix/share/RMagick directory and its subdirectories.
       (This assumes you installed the documentation in the default
       directory.)

Upgrading
---------
If you upgrade to a newer release of ImageMagick, make sure you're using a
release of RMagick that supports that release. Usually I put out a new release
of RMagick with every new release of ImageMagick. It's safe to install a newer
release of RMagick over an earlier release.

UNDOCUMENTED FEATURES
---------------------

This release includes 2 extra features that aren't in the documentation.

1. rmconst.rb - To keep from polluting the application namespace, all of 
   RMagick's constants, including the class names, are defined in the Magick
   module. This means that all of the constants must be prefixed with the
   word "Magick". If the Magick constants don't conflict with other names
   in your application, you can use rmconst.rb to create a Ruby script that
   creates top-level definitions of all of RMagick's constants. For example,
   this script defines "Image" with the same value as "Magick::Image".

   The rmconst.rb script creates a file called RMagick_constants.rb that
   contains the constant definitions. Run rmconst.rb and then copy the
   RMagick_constants.rb file to one of the directories named in Ruby's $: 
   array. For example, "/usr/local/lib/ruby/site_ruby/1.6". Then add the line
   "require 'RMagick_constants'" at the top of your application.

2. ImageMagick logging functions - The Magick module defines two methods that
   control ImageMagick's logging function. This function is not officially
   documented by ImageMagick, so I have decided not to add them to RMagick's
   documentation. However,  you may find them helpful for debugging your
   application. (Caveat: these two methods may change behavior or be removed
   without advance notice! You are on your own!)

   Magick::set_log_event_mask(event [,...]) -> Magick
   The arguments are one or more "event domains". The set_log_event_mask method
   recognizes these event domains: "all", "annotate", "blob", "cache", "coder",
   "configure", "deprecate", "locale", "none", "render", "transform", "user",
   and "x11". ImageMagick events that match the mask are logged. The default
   domain is "none". For example,

        Magick::set_log_event_mask("render")

   Logging is controlled by the log.mgk file, which may be found in the same
   directory as the delegates.mgk files. (See ImageMagick's README.txt file.)
   The purpose of the entries in this file is undocumented, so your guess is
   as good as mine. Also, the meaning of the event domains and exactly what
   events are logged are undocumented.

   Magick::set_log_format(format) -> Magick
   The default log format is described in the log.mgk file. This method allows
   you to redefine the format at run-time. The format argument is a string
   similar to an fprintf format string. Each line in the log has the format
   described by the format string. Characters that are not control characters
   are printed as-is. The control characters are:
   
         %t - the current time
         %r - the elapsed time
         %u - the user time
         %p - the pid (process id)
         %m - the name of the ImageMagick source file that contains the
              function that generated the event
         %f - the name of the ImageMagick function that generated the
              event
         %l - the line number in the source file
         %d - the event domain (one of the event mask strings listed above)
         %e - the event name
         
   For example, the default log format is:

        Magick::set_log_format("%t %r %u %p %m/%f/%l/%d:\n  %e")


KNOWN ISSUES
------------
1. gcc 3.2, during the "install.rb setup" step, issues the warning:

   cc1: warning: changing search order for system directory "/usr/local/include"
   cc1: warning:   as it has already been specified as a non-system directory

   This does not indicate a problem.

Reporting bugs
--------------

Please report bugs in RMagick, its documentation, or its installation
programs to me at cyclists@nc.rr.com. However, I cannot help with Ruby
installation and configuration or ImageMagick installation and configuration.
Please report problems with that software to their respective authors or
distributors.

Thanks to
---------
Akinori MUSHA, for his work getting RMagick to run on FreeBSD.
Tom Payne, for reporting bugs and sending me the Ruby 1.8.0 patch.

License
-------
RMagick is Copyright 2003 by Timothy P. Hunter

RMagick is distributed under the "Artistic License" included below.
Please note that this license is not a license for the Ruby software or
the ImageMagick software, which are distributed under separate
licenses. If you have questions about the RMagick license please
contact the author at cyclists@nc.rr.com. If you have questions
about the Ruby license or the ImageMagick license please refer to
the legal information included with that software.

============================================================================

Preamble

The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.

Definitions


    "Package" refers to the collection of files distributed by the
    Copyright Holder, and derivatives of that collection of files
    created through textual modification.


    "Standard Version" refers to such a Package if it has not been
    modified, or has been modified in accordance with the wishes
    of the Copyright Holder as specified below.


    "Copyright Holder" is whoever is named in the copyright or
    copyrights for the package.


    "You" is you, if you're thinking about copying or distributing
    this Package.


    "Reasonable copying fee" is whatever you can justify on the
    basis of media cost, duplication charges, time of people involved,
    and so on.  (You will not be required to justify it to the
    Copyright Holder, but only to the computing community at large
    as a market that must bear the fee.)


    "Freely Available" means that no fee is charged for the item
    itself, though there may be fees involved in handling the item.
    It also means that recipients of the item may redistribute it
    under the same conditions they received it.


You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.


You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder.  A Package
modified in such a way shall still be considered the Standard Version.


You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:


place your modifications in the Public Domain or otherwise make them
    Freely Available, such as by posting said modifications to Usenet or
    an equivalent medium, or placing the modifications on a major archive
    site such as uunet.uu.net, or by allowing the Copyright Holder to include
    your modifications in the Standard Version of the Package.

    
use the modified Package only within your corporation or organization.

    


rename any non-standard executables so the names do not conflict
    with standard executables, which must also be provided, and provide
    a separate manual page for each non-standard executable that clearly
    documents how it differs from the Standard Version.

    

make other distribution arrangements with the Copyright Holder.



You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:


distribute a Standard Version of the executables and library files,
    together with instructions (in the manual page or equivalent) on where
    to get the Standard Version.

    
accompany the distribution with the machine-readable source of
    the Package with your modifications.

    


give non-standard executables non-standard names, and clearly
    document the differences in manual pages (or equivalent), together
    with instructions on where to get the Standard Version.

    

make other distribution arrangements with the Copyright Holder.



You may charge a reasonable copying fee for any distribution of this
Package.  You may charge any fee you choose for support of this
Package.  You may not charge a fee for this Package itself.  However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own.  You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.


The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whomever generated
them, and may be sold commercially, and may be aggregated with this
Package.  If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.


C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.


Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution.  Such use shall not be
construed as a distribution of this Package.






                The End

The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.


 THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

============================================================================
