Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial revision

  • Loading branch information...
commit d9b079ab68daa0e9900130411b1c45dadbd93651 0 parents
tim authored
Showing with 38,082 additions and 0 deletions.
  1. +114 −0 ChangeLog
  2. +28 −0 Makefile.in
  3. +522 −0 README.html
  4. +494 −0 README.txt
  5. +27 −0 TODO
  6. +244 −0 configure.ac
  7. +147 −0 doc/comtasks.html
  8. +1,304 −0 doc/constants.html
  9. +2,578 −0 doc/draw.html
  10. +18 −0 doc/ex/Adispatch.rb
  11. +10 −0 doc/ex/Zconstitute.rb
  12. +22 −0 doc/ex/adaptive_threshold.rb
  13. +29 −0 doc/ex/add_noise.rb
  14. +47 −0 doc/ex/affine.rb
  15. +20 −0 doc/ex/affine_transform.rb
  16. +27 −0 doc/ex/arc.rb
  17. +36 −0 doc/ex/arcpath.rb
  18. +8 −0 doc/ex/average.rb
  19. +64 −0 doc/ex/axes.rb
  20. +30 −0 doc/ex/blur_image.rb
  21. +11 −0 doc/ex/border.rb
  22. +48 −0 doc/ex/bounding_box.rb
  23. +38 −0 doc/ex/cbezier1.rb
  24. +39 −0 doc/ex/cbezier2.rb
  25. +39 −0 doc/ex/cbezier3.rb
  26. +39 −0 doc/ex/cbezier4.rb
  27. +39 −0 doc/ex/cbezier5.rb
  28. +49 −0 doc/ex/cbezier6.rb
  29. +44 −0 doc/ex/channel.rb
  30. +34 −0 doc/ex/channel_threshold.rb
  31. +11 −0 doc/ex/charcoal.rb
  32. +38 −0 doc/ex/chop.rb
  33. +29 −0 doc/ex/circle.rb
  34. +44 −0 doc/ex/clip_path.rb
  35. +57 −0 doc/ex/coalesce.rb
  36. +36 −0 doc/ex/color_fill_to_border.rb
  37. +34 −0 doc/ex/color_floodfill.rb
  38. +19 −0 doc/ex/color_point.rb
  39. +11 −0 doc/ex/color_reset.rb
  40. +26 −0 doc/ex/colorize.rb
  41. +68 −0 doc/ex/colors.rb
  42. +51 −0 doc/ex/composite.rb
  43. +35 −0 doc/ex/contrast.rb
  44. +34 −0 doc/ex/crop.rb
  45. +47 −0 doc/ex/crop_with_gravity.rb
  46. +22 −0 doc/ex/cycle_colormap.rb
  47. +323 −0 doc/ex/demo.rb
  48. +33 −0 doc/ex/describe.rb
  49. +22 −0 doc/ex/drawattrs.rb
  50. +44 −0 doc/ex/drawcomp.rb
  51. +38 −0 doc/ex/drop_shadow.rb
  52. +18 −0 doc/ex/edge.rb
  53. +42 −0 doc/ex/ellipse.rb
  54. +18 −0 doc/ex/emboss.rb
  55. +28 −0 doc/ex/enhance.rb
  56. +22 −0 doc/ex/equalize.rb
  57. +38 −0 doc/ex/flatten_images.rb
  58. +13 −0 doc/ex/flip.rb
  59. +13 −0 doc/ex/flop.rb
  60. +37 −0 doc/ex/fonts.rb
  61. +15 −0 doc/ex/frame.rb
  62. +28 −0 doc/ex/gaussian_blur.rb
  63. +48 −0 doc/ex/get_pixels.rb
  64. +24 −0 doc/ex/gradientfill.rb
  65. +43 −0 doc/ex/grav.rb
  66. +80 −0 doc/ex/gravity.rb
  67. +24 −0 doc/ex/hatchfill.rb
  68. BIN  doc/ex/images/Ballerina.jpg
  69. BIN  doc/ex/images/Balloon_Girl.jpg
  70. BIN  doc/ex/images/Blonde_with_dog.jpg
  71. BIN  doc/ex/images/Button_0.gif
  72. BIN  doc/ex/images/Button_1.gif
  73. BIN  doc/ex/images/Button_2.gif
  74. BIN  doc/ex/images/Button_3.gif
  75. BIN  doc/ex/images/Button_4.gif
  76. BIN  doc/ex/images/Button_5.gif
  77. BIN  doc/ex/images/Button_6.gif
  78. BIN  doc/ex/images/Button_7.gif
  79. BIN  doc/ex/images/Button_8.gif
  80. BIN  doc/ex/images/Button_9.gif
  81. BIN  doc/ex/images/Button_A.gif
  82. BIN  doc/ex/images/Button_B.gif
  83. BIN  doc/ex/images/Button_C.gif
  84. BIN  doc/ex/images/Button_D.gif
  85. BIN  doc/ex/images/Button_E.gif
  86. BIN  doc/ex/images/Button_F.gif
  87. BIN  doc/ex/images/Button_G.gif
  88. BIN  doc/ex/images/Button_H.gif
  89. BIN  doc/ex/images/Button_I.gif
  90. BIN  doc/ex/images/Button_J.gif
  91. BIN  doc/ex/images/Button_K.gif
  92. BIN  doc/ex/images/Button_L.gif
  93. BIN  doc/ex/images/Button_M.gif
  94. BIN  doc/ex/images/Button_N.gif
  95. BIN  doc/ex/images/Button_O.gif
  96. BIN  doc/ex/images/Button_P.gif
  97. BIN  doc/ex/images/Button_Q.gif
  98. BIN  doc/ex/images/Button_R.gif
  99. BIN  doc/ex/images/Button_S.gif
  100. BIN  doc/ex/images/Button_T.gif
  101. BIN  doc/ex/images/Button_U.gif
  102. BIN  doc/ex/images/Button_V.gif
  103. BIN  doc/ex/images/Button_W.gif
  104. BIN  doc/ex/images/Button_X.gif
  105. BIN  doc/ex/images/Button_Y.gif
  106. BIN  doc/ex/images/Button_Z.gif
  107. BIN  doc/ex/images/Cheetah.jpg
  108. BIN  doc/ex/images/Coffee.wmf
  109. BIN  doc/ex/images/Dog2.jpg
  110. BIN  doc/ex/images/Einstein.jpg
  111. BIN  doc/ex/images/Gold_Statue.jpg
  112. BIN  doc/ex/images/Grandma.jpg
  113. BIN  doc/ex/images/Hot_Air_Balloons.jpg
  114. BIN  doc/ex/images/Hot_Air_Balloons_H.jpg
  115. BIN  doc/ex/images/Jean_Jacket.jpg
  116. BIN  doc/ex/images/Lighthouse.jpg
  117. BIN  doc/ex/images/No.wmf
  118. BIN  doc/ex/images/Polynesia.jpg
  119. BIN  doc/ex/images/Red_Rocks.jpg
  120. BIN  doc/ex/images/Shorts.jpg
  121. BIN  doc/ex/images/Snake.wmf
  122. BIN  doc/ex/images/Violin.jpg
  123. BIN  doc/ex/images/model.miff
  124. BIN  doc/ex/images/notimplemented.gif
  125. BIN  doc/ex/images/rmagick.jpg
  126. BIN  doc/ex/images/roses.jpg
  127. BIN  doc/ex/images/small.tif
  128. BIN  doc/ex/images/smile.miff
  129. +33 −0 doc/ex/implode.rb
  130. +24 −0 doc/ex/level.rb
  131. +35 −0 doc/ex/level_channel.rb
  132. +36 −0 doc/ex/line.rb
  133. +49 −0 doc/ex/map.rb
  134. +27 −0 doc/ex/map_f.rb
  135. +42 −0 doc/ex/matte_fill_to_border.rb
  136. +43 −0 doc/ex/matte_floodfill.rb
  137. +45 −0 doc/ex/matte_point.rb
  138. +42 −0 doc/ex/matte_replace.rb
  139. +28 −0 doc/ex/median_filter.rb
  140. +22 −0 doc/ex/modulate.rb
  141. +26 −0 doc/ex/mono.rb
  142. +26 −0 doc/ex/morph.rb
  143. +35 −0 doc/ex/mosaic.rb
  144. +30 −0 doc/ex/motion_blur.rb
  145. +13 −0 doc/ex/negate.rb
  146. +18 −0 doc/ex/normalize.rb
  147. +19 −0 doc/ex/oil_paint.rb
  148. +36 −0 doc/ex/opacity.rb
  149. +32 −0 doc/ex/opaque.rb
  150. +13 −0 doc/ex/ordered_dither.rb
  151. +67 −0 doc/ex/path.rb
  152. +27 −0 doc/ex/pattern1.rb
  153. +27 −0 doc/ex/pattern2.rb
  154. +3,012 −0 doc/ex/pixels.rb
  155. +26 −0 doc/ex/polygon.rb
  156. +23 −0 doc/ex/polyline.rb
  157. +54 −0 doc/ex/qbezierpath.rb
  158. +40 −0 doc/ex/quantize-m.rb
  159. +41 −0 doc/ex/raise.rb
  160. +21 −0 doc/ex/random_channel_threshold.rb
  161. +32 −0 doc/ex/rectangle.rb
  162. +28 −0 doc/ex/reduce_noise.rb
  163. +10 −0 doc/ex/roll.rb
  164. +39 −0 doc/ex/rotate.rb
  165. +15 −0 doc/ex/rotate_f.rb
  166. +30 −0 doc/ex/roundrect.rb
  167. +31 −0 doc/ex/rubyname.rb
  168. +11 −0 doc/ex/sample.rb
  169. +56 −0 doc/ex/scale.rb
  170. +11 −0 doc/ex/segment.rb
  171. +12 −0 doc/ex/shade.rb
  172. +13 −0 doc/ex/shave.rb
  173. +11 −0 doc/ex/shear.rb
  174. +37 −0 doc/ex/skewx.rb
  175. +38 −0 doc/ex/skewy.rb
  176. +124 −0 doc/ex/smile.rb
  177. +13 −0 doc/ex/solarize.rb
  178. +13 −0 doc/ex/spread.rb
  179. +51 −0 doc/ex/stegano.rb
  180. +43 −0 doc/ex/stroke_dasharray.rb
  181. +49 −0 doc/ex/stroke_linecap.rb
  182. +53 −0 doc/ex/stroke_linejoin.rb
  183. +53 −0 doc/ex/stroke_width.rb
  184. +18 −0 doc/ex/swirl.rb
  185. +39 −0 doc/ex/text.rb
  186. +40 −0 doc/ex/text_align.rb
  187. +41 −0 doc/ex/text_antialias.rb
  188. +29 −0 doc/ex/text_undercolor.rb
  189. +38 −0 doc/ex/texture_fill_to_border.rb
  190. +35 −0 doc/ex/texture_floodfill.rb
  191. +24 −0 doc/ex/texturefill.rb
  192. +14 −0 doc/ex/threshold.rb
  193. +19 −0 doc/ex/thumbnail.rb
  194. +19 −0 doc/ex/to_blob.rb
  195. +35 −0 doc/ex/translate.rb
  196. +42 −0 doc/ex/transparent.rb
  197. +27 −0 doc/ex/unsharp_mask.rb
  198. +10 −0 doc/ex/wave.rb
  199. +223 −0 doc/fill.html
  200. +1,641 −0 doc/ilist.html
  201. +5,179 −0 doc/image.html
  202. +282 −0 doc/imusage.html
  203. +270 −0 doc/index.html
  204. +480 −0 doc/info.html
  205. +422 −0 doc/magick.html
  206. +100 −0 doc/rubymgen.css
  207. +479 −0 doc/struct.html
  208. +1,262 −0 doc/usage.html
  209. +22 −0 examples/image_opacity.rb
  210. +15 −0 examples/import_export.rb
  211. +26 −0 examples/pattern_fill.rb
  212. +42 −0 examples/rotating_text.rb
  213. +15 −0 ext/RMagick/extconf.rb.in
  214. +601 −0 ext/RMagick/rmagick.h
  215. +36 −0 ext/RMagick/rmagick_config.h.in
  216. +632 −0 ext/RMagick/rmfill.c
  217. +620 −0 ext/RMagick/rmilist.c
  218. +5,512 −0 ext/RMagick/rmimage.c
  219. +765 −0 ext/RMagick/rminfo.c
  220. +1,977 −0 ext/RMagick/rmmain.c
  221. +2,069 −0 ext/RMagick/rmutil.c
  222. +1,015 −0 install.rb
  223. +1,074 −0 lib/RMagick.rb
  224. +166 −0 makedist.rb
  225. +8 −0 metaconfig.in
  226. +21 −0 post-clean.rb
  227. +30 −0 post-install.rb
  228. +152 −0 post-setup.rb
  229. +69 −0 uninstall.rb
114 ChangeLog
@@ -0,0 +1,114 @@
+RMagick 1.3.0
+ o Added Image#strip!, Image#import_pixels, Image#export_pixels,
+ Image#random_channel_threshold for IM 5.5.8
+ o Changed configure to generate top-level Makefile with install,
+ uninstall targets. (Thanks to Bob Friesenhahn for the suggestion
+ and original implementation.)
+ o Incorporated 1.2.2 patch for bugs that occurred when building RMagick
+ with Ruby 1.6.7
+ o Tested with ImageMagick 5.5.8
+ o Tested with GraphicsMagick 1.0.2
+ o Tested with Ruby 1.8.0preview3
+
+RMagick 1.2.2
+ o Fixed many bugs in configuration script
+ o Added support for GraphicsMagick 1.0 (with assistance from Bob Friesenhahn)
+ o Changed default documentation directory (--doc-dir option default) to
+ $prefix/share/RMagick
+ o Added "examples" directory to contain example programs that aren't
+ referenced by the documentation
+
+RMagick 1.2.1
+ o Yet another fix to the Cygwin installation procedure
+
+RMagick 1.2.0
+ o Changed install to work correctly on Cygwin
+ (Cygwin testing by Yuki Hirakawa and David Martinez Garcia.)
+ o Changed install to support Gentoo ebuild
+ (Gentoo support provided by Tom Payne.)
+ o Changed configure script to find IM doc in IM 5.5.7
+ o Added Image#capture
+ o Added optional matte_pct argument to Image#colorize
+ o Add default argument values to Image#gaussian_blur
+ o Fix bug in Image#store_pixels that prevented it from working with
+ GIF and other PseudoClass image formats
+ o Changed Image#crop and Image#crop! to accept a GravityType constant
+ as the first argument, instead of the x- and y-offset arguments.
+ (Suggested by Robert Wagner.)
+ o Added Image::Info#filename=, image_type=
+ o Added ImageList#__map__ as an alias for Enumerable#map
+ o Added fetch, insert, select, reject methods to ImageList class for
+ Ruby 1.8.0
+ o Undefined zip and transpose methods in ImageList class for Ruby 1.8.0
+ o ImageMagick 5.5.7 supported
+
+RMagick 1.1.0
+ o Fixed bug in handle_error that caused an abend when linked with IM 5.5.6
+ o Added RMAGICK image "format". When read, returns 252x108 RMagick logo
+ in PNG format.
+ o Changed examples to give all floating point constants a leading digit.
+ o Added Image#rotate!
+ o Tested with Ruby 1.8.0preview2
+ o Added Image#extract_info, Image::Info#extract=, Image::Info#scene=,
+ Image::Info#number_scenes=, Image::Info#tile=
+ o Added Draw#text_align, Draw#text_anchor, Draw#text_undercolor
+ o ImageMagick 5.5.6 supported
+
+RMagick 1.0.0
+ o Fixed warnings when compiling with Ruby 1.8.0
+ o Added Draw#rotation=, rotated_text.rb
+ o Fixed temp image files in Montage_texture and Draw_composite
+ o ImageMagick 5.5.5 supported
+
+RMagick 0.9.5
+ o Added channel.rb example
+ o Fixed install problems with IM 5.5.1
+
+RMagick 0.9.4
+ o Cleaned up documentation.
+ o Added logging methods Magick.set_log_event_mask and Magick.set_log_format
+ o Added Magick.set_monitor
+ o Added custom serialization methods _dump and _load to Image class.
+ Added marshaling section to usage doc.
+ o Added Image#mime_type
+ o Changed install to use autoconf-generated configure script
+ o Replaced makedoc.rb with post-install.rb hook
+ o Added rmconst.rb utility script
+ o ImageMagick 5.5.4 supported
+
+RMagick 0.9.3
+ o Changed ImageList#<=> to use same algorithm as Array#<=>
+ o Changed Draw class variables to class constants
+ o Fixed bug in Magick::colors method that caused some colors
+ to be repeated or missed when the optional block is used
+ o Changed fill classes to not inherit from common Fill class.
+ Removed Fill class.
+ o Improved usage documentation
+ o Added Image#level_channel, introduced with IM 5.5.3
+ o ImageMagick 5.5.3 supported
+ o Ruby 1.6.8, 1.8.0preview1 supported
+
+RMagick 0.9.2
+ o Added crop!, flip!, flop!, magnify!, minify!, resize!, sample!,
+ scale!, shave!, channel_threshold methods to Image class
+ o Documented DisposeType, ColorSeparationMatteType and OptimizeType
+ constants
+ o Changed Image#<=>, ImageList#<=> to raise TypeError if the other
+ argument is not in the same class
+ o Deleted Image#==, ImageList#==, include Comparable in both classes
+ o Added Image#thumbnail, thumbnail!, adaptive_threshold for 5.5.2 & later
+ o Used image list functions in 5.5.2 & later
+ o ImageMagick 5.5.2 supported
+ o Removed last vestiges of 5.4.9 support
+
+RMagick 0.9.1
+ o Added -Wl,rpath option to $LDFLAGS in extconf.rb
+ o #include <sys/types.h> in rmagick.h
+ o Changed set_cache_threshold to call SetMagickResourceLimit instead of SetCacheThreshold
+ o Changed Image_texture_flood_fill to clone texture image instead of adding a reference
+ o Many fixes to the Array methods in ImageList
+ o Defined Image#<=>, defined Image#== in terms of Image#<=>
+ o Defined ImageList#<=> in terms of Image#<=>
+
+RMagick 0.9.0
+ 1st beta
28 Makefile.in
@@ -0,0 +1,28 @@
+
+# Path to ruby interpreter
+RUBY=@RUBY@
+
+# Any extra options from configure script to pass to 'install.rb config'
+RUBY_CONFIG_OPTS=@RUBY_CONFIG_OPTS@
+
+all: config.save
+ $(RUBY) install.rb setup
+
+install:
+ $(RUBY) install.rb install
+
+clean: config.save
+ $(RUBY) install.rb clean
+
+distclean: config.save
+ $(RUBY) install.rb clean
+ rm -f Makefile ext/RMagick/extconf.rb metaconfig
+ rm -f config.status Makefile config.cache config.log
+ rm -rf autom4te.cache
+
+uninstall: config.save
+ $(RUBY) uninstall.rb $(RUBY_CONFIG_OPTS)
+
+config.save: metaconfig
+ $(RUBY) install.rb config $(RUBY_CONFIG_OPTS)
+
522 README.html
@@ -0,0 +1,522 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st September 2002), see www.w3.org">
+ <title>RMagick MAJOR.MINOR.TEENY README</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=ISO-8859-1">
+ <meta name="GENERATOR" content="Quanta Plus">
+ </head>
+ <body>
+ <div align="center">
+ <h1>RMagick MAJOR.MINOR.TEENY</h1>
+ <h2>README</h2>
+ <h4>YY/MM/DD</h4>
+ </div>
+ <h2>Table of Contents</h2>
+ <ul>
+ <li><a href="#introduction">Introduction</a></li>
+ <li><a href="#contact_information">Contact
+ information</a></li>
+ <li><a href="#prerequisites">Prerequisites</a></li>
+ <li><a href="#tips">Tips for installing and configuring
+ ImageMagick and GraphicsMagick</a></li>
+ <li><a href="#installing_rmagick">Installing RMagick</a></li>
+ <li>
+ <ul>
+ <li><a href="#configuration_options">Configuration
+ options</a></li>
+ <li><a href="#running">Running the configure and make
+ scripts</a></li>
+ </ul>
+ </li>
+ <li><a href="#things_that_can_go_wrong">Things that can go
+ wrong</a></li>
+ <li><a href="#upgrading">Upgrading</a></li>
+ <li><a href="#more_samples">More samples</a></li>
+ <li><a href="#undocumented_features">Undocumented
+ features</a></li>
+ <li><a href="#known_issues">Known issues</a></li>
+ <li><a href="#reporting_bugs">Reporting bugs</a></li>
+ <li><a href="#credits">Credits</a></li>
+ <li><a href="#license">License</a></li>
+ </ul>
+ <h2><a name="introduction">Introduction</a></h2>
+ <p>RMagick is an interface between the Ruby programming
+ language and the ImageMagick and GraphicsMagick image
+ processing libraries.</p>
+ <h2><a name="contact_information">Contact Information</a></h2>
+ <b>Author:</b>&nbsp;Tim Hunter<br>
+ <b>Email:</b>&nbsp;<a href=
+ "mailto:cyclists@nc.rr.com?subject=RMagick%20Feedback">cyclists@nc.rr.com</a>
+
+ <h2><a name="prerequisites">Prerequisites</a></h2>
+ <p>You must be running either Linux, Solaris, Cygwin, or
+ FreeBSD. This version of RMagick does not run on MS Windows
+ except with Cygwin.</p>
+ <p>You must have Version 1.6.7 or later of Ruby. If you do not
+ have Ruby, you can get it from <a href=
+ "http://www.ruby-lang.org">www.ruby-lang.org</a>. You must have
+ installed ImageMagick 5.5.1 or later, or GraphicsMagick 1.0 or
+ later. If you have not already installed ImageMagick or
+ GraphicsMagick, you can get ImageMagick from <a href=
+ "http://www.imagemagick.org">www.imagemagick.org</a>, and you
+ can get GraphicsMagick from <a href=
+ "http://www.graphicsmagick.org">www.graphicsmagick.org</a>. For
+ more information about installing ImageMagick and
+ GraphicsMagick, read the tips below.</p>
+ <p>You only need one of ImageMagick or GraphicsMagick. RMagick
+ works equally well with both.</p>
+ <h2><a name="tips">Tips for installing and configuring
+ ImageMagick and GraphicsMagick</a></h2>
+ <p>If you have never installed ImageMagick or GraphicsMagick
+ before, I strongly encourage you to install the newest version
+ of your choice from source. I also strongly encourage you to
+ read the README.txt file as many times as is necessary for you
+ to understand how to configure it. ImageMagick and
+ GraphicsMagick are large and complicated programs and can be
+ difficult to configure. Follow these tips to minimize the
+ amount of time you'll spend and your frustration level.</p>
+ <p>Do <i>not</i> simply type ./configure and expect the
+ defaults to be correct for you. Through version 5.5.7, by
+ default, ImageMagick is configured to use a color depth
+ ("quantum-depth") of 16. Unless you have very special image
+ processing needs you should use the --with-quantum-depth=8
+ option. This will cause ImageMagick run faster and use half as
+ much memory. If you need to use 16 as the color depth, you'll
+ know it.</p>
+ <p>GraphicsMagick defaults to a color depth of 8, so you need
+ do nothing.</p>
+ <p>Since you are installing ImageMagick/GraphicsMagick to use
+ with Ruby, consider whether you want to skip
+ ImageMagick's/GraphicMagicks' support for Perl and C++ by using
+ the --without-perl and --without-magick-plus-plus options.
+ Doing so will speed up the installation process and save some
+ disk space.</p>
+ <p>Determine which image formats you are interested in using
+ and make sure that you have installed the libraries that
+ ImageMagick/GraphicsMagick uses to process these formats.
+ ImageMagick and GraphicsMagick use additional libraries to
+ support some image formats. If you do not install those
+ libraries you cannot read and write those image formats. You
+ will need to configure ImageMagick/GraphicsMagick to support
+ the JPG, PNG, TIFF, and WMF formats in order to execute all the
+ RMagick sample programs. See ImageMagick's or GraphicMagick's
+ README.txt file for more information.</p>
+ <p>You will almost certainly want to specify the
+ --enable-shared and --disable-static options.</p>
+ <p>Once you have determined the configuration options you need,
+ run the configure script. When it completes, read the summary
+ output to see if configuration worked the way you expected.
+ Here's an example of the summary output from ImageMagick's
+ configure script. Notice that the result of each option is
+ listed in the "Configured value" column.</p>
+<pre>
+Option Configure option Configured value
+-----------------------------------------------------------------
+Shared libraries --enable-shared=yes yes
+Static libraries --enable-static=no no
+GNU ld --with-gnu-ld=yes yes
+LZW support --enable-lzw=no no
+Quantum depth --with-quantum-depth=8 8
+Delegate Configuration:
+BZLIB --with-bzlib=yes yes
+DPS --with-dps=yes no (failed tests)
+FlashPIX --with-fpx=yes no
+FreeType 2.0 --with-ttf=yes yes
+Ghostscript None /usr/bin/gs
+Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/default/Type1/
+Ghostscript lib --with-gslib=no no
+JBIG --with-jbig=yes no
+JPEG v1 --with-jpeg=yes yes
+JPEG-2000 --with-jp2=yes no
+LCMS --with-lcms=yes yes
+Magick++ --with-magick-plus-plus=no no
+PERL --with-perl=no no
+PNG --with-png=yes yes
+TIFF --with-tiff=yes yes
+Windows fonts --with-windows-font-dir=/mnt/windows/windows/fonts /mnt/windows/windows/fonts/
+WMF --with-wmf=yes yes
+X11 --with-x= yes
+XML --with-xml=yes yes
+ZLIB --with-zlib=yes yes
+X11 Configuration:
+ X_CFLAGS = -I/usr/X11R6/include
+ X_PRE_LIBS = -lSM -lICE
+ X_LIBS = -L/usr/X11R6/lib
+ X_EXTRA_LIBS =
+</pre>
+ <p>If the results are not what you wanted, install any missing
+ libraries, choose new or different options, or whatever it
+ takes, erase the config.cache file, and re-run configure.
+ Repeat as often as necessary before moving to the `make' and
+ `make install' steps.</p>
+ <p>Detailed information about all of ImageMagick's and
+ GraphicsMagick's configuration options may be found in their
+ README.txt and INSTALL.txt files.</p>
+ <h4>Windows Metafile Format</h4>
+ <p>As noted in the ImageMagick and GraphicsMagick README.txt
+ files, to support images in the Windows Metafile format,
+ ImageMagick/GraphicsMagick requires an additional library.
+ Without this library some of the RMagick sample programs will
+ not work. ImageMagick and GraphicsMagick require libwmf 0.2.5,
+ 0.2.7, or 0.2.2 to support the WMF format. (Avoid libwmf
+ 0.2.6!)</p>
+ <h2><a name="installing_rmagick">Installing RMagick</a></h2>
+ <p>Installing RMagick is much simpler than installing
+ ImageMagick or GraphicsMagick. Note that the <i>make</i> step
+ runs all the example programs. This process both builds the
+ example images used in the documentation and validates your
+ RMagick installation. This step can take 5-15 minutes depending
+ on the speed of your computer.</p>
+ <h4><a name="configuration_options">Configuration
+ options</a></h4>
+ <p>Type <code>./configure --help</code> to see a list of
+ configuration options. In addition to the regular options,
+ there are a few RMagick-specific options:</p>
+ <dl>
+ <dt>--with-imdoc-base-uri=uri</dt>
+ <dd>
+ <p>During installation, all links in the RMagick
+ documentation that link to the ImageMagick or
+ GraphicsMagick web site are replaced with links to your
+ local copies of the documentation. If you want to
+ specify a different location, use the --with-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/****Magick" (where $prefix is the
+ prefix you used when you installed ImageMagick or
+ GraphicsMagick). If the configure script doesn't find the
+ documentation in the default directory it will use
+ "http://www.imagemagick.org" or
+ "http://www.graphicsmagick.org". For example,</p>
+<pre>
+./configure --with-imdoc-base-uri=file:///home/user/ImageMagick
+</pre>
+ </dd>
+ <dt>--with-doc-dir=directory</dt>
+ <dd>
+ Specify the directory to install the RMagick documentation.
+ By default this is $prefix/share/RMagick, where $prefix is
+ the prefix specified by --prefix. For example, to install
+ the documentation in /home/user/RMagick, specify:
+<pre>
+./configure --with-doc-dir=/home/user/RMagick
+</pre>
+ </dd>
+ <dt>--enable-allow-example-errors</dt>
+ <dd>Normally the documentation installation terminates if 5
+ examples fail. If you use this option, the installation does
+ not check for failing examples and will always complete. This
+ option is useful if you're having trouble installing RMagick
+ and you want to see all the failing examples.</dd>
+ </dl>
+ <br>
+
+ <h4><a name="running">Running the <code>configure</code> and
+ <code>make</code> scripts</a></h4>
+ <p>De-compress the RMagick-MAJOR.MINOR.TEENY.tar.gz archive and
+ enter the top directory. Then type:</p>
+<pre>
+ $ ./configure &lt;configuration options&gt;
+ $ make
+ ($ su)
+ $ make install
+ (optionally)
+ $ make clean
+</pre>
+ <h2><a name="things_that_can_go_wrong">Things that can go
+ wrong</a></h2>
+ <dl>
+ <dt><b>Cannot open shared object file</b></dt>
+ <dd>
+ <p>When <code>make</code> is running the examples, if you get
+ a message like this:</p>
+<pre>
+/home/you/RMagick-MAJOR.MINOR.TEENY/lib/RMagick.rb:11:in `require': libMagick.so.0:
+ cannot open shared object file: No such file or directory -
+ /home/you/RMagick-MAJOR.MINOR.TEENY/ext/RMagick/RMagick.so (LoadError)
+</pre>
+ <p>you probably do not have the directory in which the
+ ImageMagick or GraphicsMagick library is installed in your
+ load path. An easy way to fix this is to define the
+ directory in the LD_LIBRARY_PATH environment variable. For
+ example, suppose you installed the GraphicsMagick library
+ libGraphicsMagick.so in /usr/local/lib. (By default this is
+ where it is installed.) Create the LD_LIBRARY_PATH variable
+ like this:</p>
+<pre>
+export LD_LIBRARY_PATH=/usr/local/lib
+</pre>
+ <p>On Linux, see <code>ld(1)</code> and
+ <code>ld.so(8)</code> for more information. On other
+ operating systems, see the documentation for the dynamic
+ loading facility.</p>
+ </dd>
+ <dt><b>No such file or directory -
+ "/tmp/rmagick6872.6"</b></dt>
+ <dd>
+ <p>When <code>make</code> is running the examples, if you get
+ a message like this:</p>
+<pre>
+hook /home/me/src/RMagick-MAJOR.MINOR.TEENY/./post-setup.rb failed:
+No such file or directory - "/tmp/rmagick6872.6"
+</pre>
+ <p>you probably do not have a temporary directory
+ environment variable set. Set the TMPDIR environment
+ variable to your temporary directory. For example:</p>
+<pre>
+export TMPDIR=/home/me/tmp
+</pre>
+ </dd>
+ </dl>
+ <h2><a name="upgrading">Upgrading</a></h2>
+ <p>If you upgrade to a newer release of ImageMagick or
+ GraphicsMagick, 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.</p>
+ <h2>More samples</h2>
+ <p>You can find more sample RMagick programs in the /example
+ directory. These programs are not installed in the RMagick
+ documentation tree.</p>
+ <h2><a name="undocumented_features">Undocumented
+ features</a></h2>
+ <p>This release includes an extra feature that isn't in the
+ documentation. 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!)</p>
+ <p><i>Magick::set_log_event_mask(event [,...]) -&gt;
+ Magick</i></p>
+ <p>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", "draw", "locale", "none", "resource", "transform", "user",
+ and "x11". ImageMagick events that match the mask are logged.
+ The default domain is "none". For example,</p>
+<pre>
+ Magick::set_log_event_mask("render")
+
+</pre>
+ <p>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.</p>
+ <p><i>Magick::set_log_format(format) -&gt; Magick</i></p>
+ <p>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:</p>
+<pre>
+ %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
+</pre>
+ <p>For example, the default log format is:</p>
+<pre>
+ Magick::set_log_format("%t %r %u %p %m/%f/%l/%d:\n %e")
+</pre>
+ <h2><a name="known_issues">Known issues</a></h2>
+ <ol>
+ <li>
+ gcc 3.2, during the "install.rb setup" step, issues the
+ warning:
+<pre>
+cc1: warning: changing search order for system directory "/usr/local/include"
+cc1: warning: as it has already been specified as a non-system directory
+</pre>
+ This does not indicate a problem.
+ </li>
+ </ol>
+ <h2><a name="reporting_bugs">Reporting bugs</a></h2>
+ <p>Please report bugs in RMagick, its documentation, or its
+ installation programs to me at <a href=
+ "mailto:cyclists@nc.rr.com?subject=RMagick%20bug%20report">cyclists@nc.rr.com</a>.
+ However, I cannot help with Ruby installation and configuration
+ or ImageMagick or GraphicsMagick installation and
+ configuration. Please report problems with that software to
+ their respective authors or distributors.</p>
+ <h2><a name="credits">Credits</a></h2>
+ <p>Thanks to</p>
+ <ul>
+ <li>Akinori MUSHA, for his work making RMagick available on
+ FreeBSD</li>
+ <li>Tom Payne, for reporting bugs, sending me the Ruby 1.8.0
+ patches, and for the Gentoo ebuild</li>
+ <li>Bob Friesenhahn, for helping with the GraphicsMagick
+ support and in many other ways</li>
+ <li>
+ Simple Systems, for hosting the RMagick documentation online.
+ </li>
+ <li>Mike Williams, for the RMagick Debian package</li>
+ </ul>
+ <h2><a name="license">License</a></h2>
+ <p>RMagick is distributed under the "Artistic License" included
+ below. Please note that this license is not a license for the
+ Ruby software, the GraphicsMagick software, or the ImageMagick
+ software, which are distributed under separate licenses. If you
+ have questions about the RMagick license please contact the
+ author at <a href=
+ "mailto:cyclists@nc.rr.com?subject=RMagick%20license%20question">
+ cyclists@nc.rr.com</a>. If you have questions about the Ruby
+ license, the ImageMagick license, or the GraphicsMagick
+ license, please refer to the legal information included with
+ that software.</p>
+ <blockquote>
+ <div style="padding: 1em; background-color: #dcdcdc">
+ <h2>Preamble</h2>
+ <p>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.</p>
+ <h2>Definitions</h2>
+ <ul>
+ <li>"Package" refers to the collection of files
+ distributed by the Copyright Holder, and derivatives of
+ that collection of files created through textual
+ modification.</li>
+ <li>"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.</li>
+ <li>"Copyright Holder" is whoever is named in the
+ copyright or copyrights for the package.</li>
+ <li>"You" is you, if you're thinking about copying or
+ distributing this Package.</li>
+ <li>"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.)</li>
+ <li>"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.</li>
+ </ul>
+ <p>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.</p>
+ <p>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.</p>
+ <p>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:</p>
+ <ol>
+ <li>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.</li>
+ <li>use the modified Package only within your corporation
+ or organization.</li>
+ <li>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.</li>
+ <li>make other distribution arrangements with the
+ Copyright Holder.</li>
+ </ol>
+ <p>You may distribute the programs of this Package in
+ object code or executable form, provided that you do at
+ least ONE of the following:</p>
+ <ol>
+ <li>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.</li>
+ <li>accompany the distribution with the machine-readable
+ source of the Package with your modifications.</li>
+ <li>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.</li>
+ <li>make other distribution arrangements with the
+ Copyright Holder.</li>
+ </ol>
+ <p>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.</p>
+ <p>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.</p>
+ <p>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.</p>
+ <p>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.</p>
+ <div align="center">
+ The End
+ </div>
+ <p>The name of the Copyright Holder may not be used to
+ endorse or promote products derived from this software
+ without specific prior written permission.</p>
+ 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.
+ </div>
+ </blockquote>
+ <div align="center" style="padding: 3em">
+ RMagick is Copyright &copy; 2003 by Timothy P. Hunter
+ </div>
+ </body>
+</html>
494 README.txt
@@ -0,0 +1,494 @@
+
+ RMagick MAJOR.MINOR.TEENY
+
+
+ README
+
+
+ YY/MM/DD
+
+
+ Table of Contents
+
+ * Introduction <#introduction>
+ * Contact information <#contact_information>
+ * Prerequisites <#prerequisites>
+ * Tips for installing and configuring ImageMagick and GraphicsMagick
+ <#tips>
+ * Installing RMagick <#installing_rmagick>
+ *
+ o Configuration options <#configuration_options>
+ o Running the configure and make scripts <#running>
+ * Things that can go wrong <#things_that_can_go_wrong>
+ * Upgrading <#upgrading>
+ * More samples <#more_samples>
+ * Undocumented features <#undocumented_features>
+ * Known issues <#known_issues>
+ * Reporting bugs <#reporting_bugs>
+ * Credits <#credits>
+ * License <#license>
+
+
+ Introduction
+
+RMagick is an interface between the Ruby programming language and the
+ImageMagick and GraphicsMagick image processing libraries.
+
+
+ Contact Information
+
+*Author:* Tim Hunter
+*Email:* cyclists@nc.rr.com
+<mailto:cyclists@nc.rr.com?subject=RMagick%20Feedback>
+
+
+ Prerequisites
+
+You must be running either Linux, Solaris, 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 <http://www.ruby-lang.org>. You
+must have installed ImageMagick 5.5.1 or later, or GraphicsMagick 1.0 or
+later. If you have not already installed ImageMagick or GraphicsMagick,
+you can get ImageMagick from www.imagemagick.org
+<http://www.imagemagick.org>, and you can get GraphicsMagick from
+www.graphicsmagick.org <http://www.graphicsmagick.org>. For more
+information about installing ImageMagick and GraphicsMagick, read the
+tips below.
+
+You only need one of ImageMagick or GraphicsMagick. RMagick works
+equally well with both.
+
+
+ Tips for installing and configuring ImageMagick and GraphicsMagick
+
+If you have never installed ImageMagick or GraphicsMagick before, I
+strongly encourage you to install the newest version of your choice from
+source. I also strongly encourage you to read the README.txt file as
+many times as is necessary for you to understand how to configure it.
+ImageMagick and GraphicsMagick are large and complicated programs and
+can be difficult to configure. Follow these tips to minimize the amount
+of time you'll spend and your frustration level.
+
+Do /not/ simply type ./configure and expect the defaults to be correct
+for you. Through version 5.5.7, by default, ImageMagick is configured to
+use a color depth ("quantum-depth") of 16. Unless you have very special
+image processing needs you should use the --with-quantum-depth=8 option.
+This will cause ImageMagick run faster and use half as much memory. If
+you need to use 16 as the color depth, you'll know it.
+
+GraphicsMagick defaults to a color depth of 8, so you need do nothing.
+
+Since you are installing ImageMagick/GraphicsMagick to use with Ruby,
+consider whether you want to skip ImageMagick's/GraphicMagicks' support
+for Perl and C++ by using the --without-perl and
+--without-magick-plus-plus options. Doing so will speed up the
+installation process and save some disk space.
+
+Determine which image formats you are interested in using and make sure
+that you have installed the libraries that ImageMagick/GraphicsMagick
+uses to process these formats. ImageMagick and GraphicsMagick use
+additional libraries to support some image formats. If you do not
+install those libraries you cannot read and write those image formats.
+You will need to configure ImageMagick/GraphicsMagick to support the
+JPG, PNG, TIFF, and WMF formats in order to execute all the RMagick
+sample programs. See ImageMagick's or GraphicMagick's README.txt file
+for more information.
+
+You will almost certainly want to specify the --enable-shared and
+--disable-static options.
+
+Once you have determined the configuration options you need, run the
+configure script. When it completes, read the summary output to see if
+configuration worked the way you expected. Here's an example of the
+summary output from ImageMagick's configure script. Notice that the
+result of each option is listed in the "Configured value" column.
+
+Option Configure option Configured value
+-----------------------------------------------------------------
+Shared libraries --enable-shared=yes yes
+Static libraries --enable-static=no no
+GNU ld --with-gnu-ld=yes yes
+LZW support --enable-lzw=no no
+Quantum depth --with-quantum-depth=8 8
+Delegate Configuration:
+BZLIB --with-bzlib=yes yes
+DPS --with-dps=yes no (failed tests)
+FlashPIX --with-fpx=yes no
+FreeType 2.0 --with-ttf=yes yes
+Ghostscript None /usr/bin/gs
+Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/default/Type1/
+Ghostscript lib --with-gslib=no no
+JBIG --with-jbig=yes no
+JPEG v1 --with-jpeg=yes yes
+JPEG-2000 --with-jp2=yes no
+LCMS --with-lcms=yes yes
+Magick++ --with-magick-plus-plus=no no
+PERL --with-perl=no no
+PNG --with-png=yes yes
+TIFF --with-tiff=yes yes
+Windows fonts --with-windows-font-dir=/mnt/windows/windows/fonts /mnt/windows/windows/fonts/
+WMF --with-wmf=yes yes
+X11 --with-x= yes
+XML --with-xml=yes yes
+ZLIB --with-zlib=yes yes
+X11 Configuration:
+ X_CFLAGS = -I/usr/X11R6/include
+ X_PRE_LIBS = -lSM -lICE
+ X_LIBS = -L/usr/X11R6/lib
+ X_EXTRA_LIBS =
+
+If the results are not what you wanted, install any missing libraries,
+choose new or different options, or whatever it takes, erase the
+config.cache file, and re-run configure. Repeat as often as necessary
+before moving to the `make' and `make install' steps.
+
+Detailed information about all of ImageMagick's and GraphicsMagick's
+configuration options may be found in their README.txt and INSTALL.txt
+files.
+
+
+ Windows Metafile Format
+
+As noted in the ImageMagick and GraphicsMagick README.txt files, to
+support images in the Windows Metafile format,
+ImageMagick/GraphicsMagick requires an additional library. Without this
+library some of the RMagick sample programs will not work. ImageMagick
+and GraphicsMagick require libwmf 0.2.5, 0.2.7, or 0.2.2 to support the
+WMF format. (Avoid libwmf 0.2.6!)
+
+
+ Installing RMagick
+
+Installing RMagick is much simpler than installing ImageMagick or
+GraphicsMagick. Note that the /make/ step runs all the example programs.
+This process both builds the example images used in the documentation
+and validates your RMagick installation. This step can take 5-15 minutes
+depending on the speed of your computer.
+
+
+ Configuration options
+
+Type |./configure --help| to see a list of configuration options. In
+addition to the regular options, there are a few RMagick-specific options:
+
+--with-imdoc-base-uri=uri
+
+ During installation, all links in the RMagick documentation that
+ link to the ImageMagick or GraphicsMagick web site are replaced with
+ links to your local copies of the documentation. If you want to
+ specify a different location, use the --with-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/****Magick" (where $prefix is the prefix you
+ used when you installed ImageMagick or GraphicsMagick). If the
+ configure script doesn't find the documentation in the default
+ directory it will use "http://www.imagemagick.org" or
+ "http://www.graphicsmagick.org". For example,
+
+./configure --with-imdoc-base-uri=file:///home/user/ImageMagick
+
+--with-doc-dir=directory
+ Specify the directory to install the RMagick documentation. By
+ default this is $prefix/share/RMagick, where $prefix is the prefix
+ specified by --prefix. For example, to install the documentation in
+ /home/user/RMagick, specify:
+
+./configure --with-doc-dir=/home/user/RMagick
+
+--enable-allow-example-errors
+ Normally the documentation installation terminates if 5 examples
+ fail. If you use this option, the installation does not check for
+ failing examples and will always complete. This option is useful if
+ you're having trouble installing RMagick and you want to see all the
+ failing examples.
+
+
+ Running the |configure| and |make| scripts
+
+De-compress the RMagick-MAJOR.MINOR.TEENY.tar.gz archive and enter the
+top directory. Then type:
+
+ $ ./configure <configuration options>
+ $ make
+ ($ su)
+ $ make install
+ (optionally)
+ $ make clean
+
+
+ Things that can go wrong
+
+*Cannot open shared object file*
+
+ When |make| is running the examples, if you get a message like this:
+
+/home/you/RMagick-MAJOR.MINOR.TEENY/lib/RMagick.rb:11:in `require': libMagick.so.0:
+ cannot open shared object file: No such file or directory -
+ /home/you/RMagick-MAJOR.MINOR.TEENY/ext/RMagick/RMagick.so (LoadError)
+
+ you probably do not have the directory in which the ImageMagick or
+ GraphicsMagick library is installed in your load path. An easy way
+ to fix this is to define the directory in the LD_LIBRARY_PATH
+ environment variable. For example, suppose you installed the
+ GraphicsMagick library libGraphicsMagick.so in /usr/local/lib. (By
+ default this is where it is installed.) Create the LD_LIBRARY_PATH
+ variable like this:
+
+export LD_LIBRARY_PATH=/usr/local/lib
+
+ On Linux, see |ld(1)| and |ld.so(8)| for more information. On other
+ operating systems, see the documentation for the dynamic loading
+ facility.
+
+*No such file or directory - "/tmp/rmagick6872.6"*
+
+ When |make| is running the examples, if you get a message like this:
+
+hook /home/me/src/RMagick-MAJOR.MINOR.TEENY/./post-setup.rb failed:
+No such file or directory - "/tmp/rmagick6872.6"
+
+ you probably do not have a temporary directory environment variable
+ set. Set the TMPDIR environment variable to your temporary
+ directory. For example:
+
+export TMPDIR=/home/me/tmp
+
+
+ Upgrading
+
+If you upgrade to a newer release of ImageMagick or GraphicsMagick, 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.
+
+
+ More samples
+
+You can find more sample RMagick programs in the /example directory.
+These programs are not installed in the RMagick documentation tree.
+
+
+ Undocumented features
+
+This release includes an extra feature that isn't in the documentation.
+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", "draw", "locale", "none",
+"resource", "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
+<mailto:cyclists@nc.rr.com?subject=RMagick%20bug%20report>. However, I
+cannot help with Ruby installation and configuration or ImageMagick or
+GraphicsMagick installation and configuration. Please report problems
+with that software to their respective authors or distributors.
+
+
+ Credits
+
+Thanks to
+
+ * Akinori MUSHA, for his work making RMagick available on FreeBSD
+ * Tom Payne, for reporting bugs, sending me the Ruby 1.8.0 patches,
+ and for the Gentoo ebuild
+ * Bob Friesenhahn, for helping with the GraphicsMagick support and
+ in many other ways
+ * Simple Systems, for hosting the RMagick documentation online.
+ * Mike Williams, for the RMagick Debian package
+
+
+ License
+
+RMagick is distributed under the "Artistic License" included below.
+Please note that this license is not a license for the Ruby software,
+the GraphicsMagick 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
+<mailto:cyclists@nc.rr.com?subject=RMagick%20license%20question>. If you
+have questions about the Ruby license, the ImageMagick license, or the
+GraphicsMagick 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:
+
+ 1. 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.
+ 2. use the modified Package only within your corporation or
+ organization.
+ 3. 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.
+ 4. 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:
+
+ 1. 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.
+ 2. accompany the distribution with the machine-readable source of
+ the Package with your modifications.
+ 3. 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.
+ 4. 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.
+
+RMagick is Copyright � 2003 by Timothy P. Hunter
27 TODO
@@ -0,0 +1,27 @@
+
+unit tests
+ to_blob, read_blob
+ Magick::Pixel#to_color, from_color
+ Magick::Pixel#to_HSL, from_HSL
+ Image#colormap(index<, color_name || pixel>)
+ Image#pixel_color(x,y<,color_name || pixel>) Gets/Sets color at pixel(x,y) See Image::pixelColor
+
+test
+ Image#draw_affine_image
+ Image#profile!
+ Magick.set_cache_threshold
+
+Watch "deprecated.c"
+
+Magick++
+ continue reading sources
+
+Next release
+
+Immediate (!) forms
+ transparent
+ opaque
+
+Far future
+ MagickWand API
+ support Ruby coder
244 configure.ac
@@ -0,0 +1,244 @@
+
+# RMagick configure.ac
+
+AC_INIT(RMagick, x.y.z, cyclists@nc.rr.com, RMagick-x.y.z.tar.gz)
+echo "Configuring ${PACKAGE_STRING}"
+
+AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
+
+# Check for required programs
+AC_PROG_CC
+AC_PROG_CC_STDC
+AC_PATH_PROG(RUBY, ruby,)
+if test -z "$RUBY"; then
+ AC_MSG_ERROR([Can't install RMagick. Ruby must be installed first.])
+fi
+
+# See if user prefers GraphicsMagick over ImageMagick
+AC_ARG_WITH(graphics-magick,
+ AC_HELP_STRING([--with-graphics-magick], [configure RMagick with GraphicsMagick]),
+ [with_graphics_magick=$withval],
+ [with_graphics_magick='no'])
+
+if test "$with_graphics_magick" != 'no' ; then
+ AC_CHECK_PROGS(MAGICKCONFIG, GraphicsMagick-config)
+ if test -z "$MAGICKCONFIG"; then
+ AC_MSG_ERROR([Can't install RMagick. Can't find GraphicsMagick-config program.])
+ fi
+ MAGICKNAME=GraphicsMagick
+ MAGICKLIB=GraphicsMagick
+ AC_DEFINE(GRAPHICSMAGICK,1)
+
+# Otherwise see which one is installed
+else
+ AC_CHECK_PROGS(MAGICKCONFIG, [Magick-config GraphicsMagick-config])
+ if test -z "$MAGICKCONFIG"; then
+ AC_MSG_ERROR([Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program.])
+ else
+ case "$MAGICKCONFIG" in
+ Magick-config )
+ MAGICKNAME=ImageMagick
+ MAGICKLIB=Magick
+ ;;
+ GraphicsMagick-config )
+ MAGICKNAME=GraphicsMagick
+ MAGICKLIB=GraphicsMagick
+ AC_DEFINE(GRAPHICSMAGICK,1)
+ ;;
+ esac
+ fi
+fi
+
+# Append ***Magick's lists of flags to the user's lists (if any)
+LDFLAGS="${LDFLAGS} `${MAGICKCONFIG} --ldflags`"
+CPPFLAGS="${CPPFLAGS} `${MAGICKCONFIG} --cppflags`"
+
+AC_CHECK_LIB($MAGICKLIB, InitializeMagick, [],
+ [AC_MSG_ERROR([Can't install RMagick. Can't find lib${MAGICKLIB}])],
+ [`${MAGICKCONFIG} --libs`])
+
+AC_SUBST(MAGICKLIB)
+AC_SUBST(MAGICKNAME)
+AC_SUBST(MAGICKCONFIG)
+AC_DEFINE_UNQUOTED(MAGICKNAME, $MAGICKNAME)
+
+AC_CHECK_HEADER(magick/api.h, [],
+ [AC_MSG_ERROR([Can't find magick/api.h])])
+
+# What functions?
+AC_CHECK_FUNCS([AdaptiveThresholdImage AppendImageToList LevelImageChannel ThumbnailImage RemoveFirstImageFromList GetNextImageInList SetLogFormat XImportImage ExportImagePixels ImportImagePixels ThresholdImageChannel RandomChannelThresholdImage StripImage AcquireMagickMemory])
+
+# What typedefs?
+AC_CHECK_TYPES([DisposeType,
+ ExtendedSignedIntegralType,
+ ExtendedUnsignedIntegralType],
+ [], [],
+ [#include <stdio.h>
+ #if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #include "magick/api.h"])
+
+# Don't use AC_CHECK_MEMBERS!
+AC_CACHE_CHECK(if Image has extract_info, rm_cv_member_Image_extract_info,
+ AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <stdio.h>
+#include "magick/api.h"],
+ [Image i; i.extract_info.x = 0;],
+ rm_cv_member_Image_extract_info=yes,
+ rm_cv_member_Image_extract_info=no))
+if test "$rm_cv_member_Image_extract_info" = yes; then
+ AC_DEFINE(HAVE_IMAGE_EXTRACT_INFO)
+fi
+
+AC_CACHE_CHECK(if ImageInfo has number_scenes, rm_cv_member_ImageInfo_number_scenes,
+ AC_TRY_COMPILE([
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <stdio.h>
+#include "magick/api.h"],
+ [ImageInfo i; i.number_scenes = 0;],
+ rm_cv_member_ImageInfo_number_scenes=yes,
+ rm_cv_member_ImageInfo_number_scenes=no))
+if test "$rm_cv_member_ImageInfo_number_scenes" = yes; then
+ AC_DEFINE(HAVE_IMAGEINFO_NUMBER_SCENES)
+fi
+
+AC_CACHE_CHECK(for NoCompliance enum value, rm_cv_enum_nocompliance,
+ [AC_TRY_COMPILE(
+[#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include "magick/api.h"],
+ [ComplianceType x; x = NoCompliance],
+ rm_cv_enum_nocompliance='yes',
+ rm_cv_enum_nocompliance='no')])
+
+if test "$rm_cv_enum_nocompliance" = yes; then
+ AC_DEFINE(HAVE_NOCOMPLIANCE)
+fi
+
+# Determine documentation base URI
+
+# Where is ****Magick installed?
+MAGICKPREFIX=`${MAGICKCONFIG} --prefix`
+
+AC_CACHE_CHECK(for documentation base URI, rm_cv_path_doc_base_uri,
+ [rm_cv_path_doc_base_uri=''
+ # Look for ImageMagick.html.
+ for docroot in $MAGICKPREFIX/share/$MAGICKNAME*
+ do
+ if test -f "$docroot/$MAGICKNAME.html"; then
+ rm_cv_path_doc_base_uri=file://${docroot}
+ break 1
+ fi
+ done
+ # In IM 5.5.7 and later, and GM 1.0, there is no ImageMagick.html file.
+ # Look for www directory.
+ if test "${rm_cv_path_doc_base_uri}x" = 'x'; then
+ for docroot in $MAGICKPREFIX/share/$MAGICKNAME*
+ do
+ if test -d "$docroot/www"; then
+ rm_cv_path_doc_base_uri="file://${docroot}"
+ break 1
+ fi
+ done
+ fi
+ # Give up and use the default.
+ if test "${rm_cv_path_doc_base_uri}x" = 'x'; then
+ case "$MAGICKNAME" in
+ ImageMagick )
+ rm_cv_path_doc_base_uri=http://www.imagemagick.org
+ ;;
+ GraphicsMagick )
+ rm_cv_path_doc_base_uri=http://www.graphicsmagick.org
+ ;;
+ esac
+ fi
+ ])
+
+MAGICKBASEURI="$rm_cv_path_doc_base_uri"
+AC_SUBST(MAGICKBASEURI)
+
+# Options to pass to ruby config step
+
+RUBY_CONFIG_OPTS=''
+
+if test "x$prefix" != xNONE; then
+ RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --prefix=$prefix"
+fi
+if test `eval echo $bindir` != NONE/bin; then
+ RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --bindir=`eval echo $bindir`"
+fi
+if test `eval echo $datadir` != ${prefix}/share; then
+ RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --datadir=`eval echo $datadir`"
+fi
+
+AC_ARG_WITH(imdoc-base-uri,
+ AC_HELP_STRING([--with-imdoc-base-uri=URI], [ImageMagick/GraphicsMagick documentation URI]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --imdoc-base-uri=$withval"],
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --imdoc-base-uri=$rm_cv_path_doc_base_uri"])
+
+AC_ARG_WITH(doc-dir,
+ AC_HELP_STRING([--with-doc-dir=DIR], [RMagick documentation directory [[PREFIX/share/RMagick]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --doc-dir=$withval"], )
+
+AC_ARG_WITH(std-ruby,
+ AC_HELP_STRING([--with-std-ruby=DIR], [the directory for standard ruby libraries [[PREFIX/lib/ruby/1.x]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --std-ruby=$withval"], )
+
+AC_ARG_WITH(site-ruby,
+ AC_HELP_STRING([--with-site-ruby=DIR], [the directory for non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby/1.x]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --site-ruby=$withval"], )
+
+AC_ARG_WITH(site-ruby-common,
+ AC_HELP_STRING([--with-site-ruby-common=DIR], [the directory for version-independent non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --site-ruby-common=$withval"], )
+
+AC_ARG_WITH(rb-dir,
+ AC_HELP_STRING([--with-rb-dir=DIR], [the directory for ruby scripts [[PREFIX/lib/ruby/site_ruby/1.x]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rb-dir=$withval"], )
+
+AC_ARG_WITH(so-dir,
+ AC_HELP_STRING([--with-so-dir=DIR], [the directory for ruby extensions]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --so-dir=$withval"], )
+
+AC_ARG_WITH(ruby-path,
+ AC_HELP_STRING([--with-ruby-path=DIR], [path to set to #! line [PREFIX/bin/ruby]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-path=$withval"], )
+
+AC_ARG_WITH(ruby-prog,
+ AC_HELP_STRING([--with-ruby-prog=NAME], [the ruby program used for installation [[PREFIX/bin/ruby]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-prog=$withval"
+ RUBY=$withval], )
+
+AC_ARG_WITH(make-prog,
+ AC_HELP_STRING([--with-make-prog=NAME], [the make program to compile ruby extensions [[make]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --make-prog=$withval"], )
+
+AC_ARG_WITH(rbconfig,
+ AC_HELP_STRING([--with-rbconfig=PATH], [your rbconfig to load [[ruby's]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rbconfig=$withval"], )
+
+AC_ARG_ENABLE(without-ext,
+ AC_HELP_STRING([--enable-without-ext], [does not compile/install ruby extensions [[--disable-without-ext]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --without-ext"], )
+
+AC_ARG_ENABLE(no-harm,
+ AC_HELP_STRING([--enable-no-harm], [only display what to do if given [[--disable-no-harm]]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --no-harm"], )
+
+AC_ARG_ENABLE(allow-example-errors,
+ AC_HELP_STRING([--enable-allow-example-errors], [allow installation to proceed even if a lot of examples fail [--disable-allow-example-errors]]),
+ [RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --allow-example-errors"], )
+
+AC_SUBST(RUBY)
+AC_SUBST(RUBY_CONFIG_OPTS)
+
+AC_OUTPUT(Makefile ext/RMagick/extconf.rb metaconfig)
+
147 doc/comtasks.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st September 2002), see www.w3.org">
+ <title>RMagick: Common Tasks</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Quanta Plus">
+ <link type="text/css" rel="stylesheet" href="rubymgen.css">
+ </head>
+ <body>
+ <table width="100%">
+ <tr>
+ <td style="text-align: left"><a href="imusage.html">&lt;-
+ Prev</a></td>
+ <td style="text-align: center"><a href=
+ "index.html">Contents</a></td>
+ <td style="text-align: right"><a href="magick.html">Next
+ -&gt;</a></td>
+ </tr>
+ </table>
+ <table width="100%" cellspacing="0" cellpadding="5">
+ <tr class="stdtitle">
+ <td>Common Tasks</td>
+ </tr>
+ </table>
+ <h2>Getting information about an image</h2>
+ <p>One of the most fundamental operations on an image is simply
+ getting basic information about the image. RMagick assigns
+ dozens of <a href="imageattrs.html">attributes</a> to an image.
+ All you have to do is read the image and then call the
+ attribute methods. Here's a Ruby program that takes image
+ filenames from the command line and then prints a variety of
+ information about each image to the terminal.</p>
+ <table border="0" width="100%">
+ <tr>
+ <td>
+<pre class="example">
+ require 'RMagick'
+ ARGV.each { |file|
+ puts file
+ img = Magick::Image::read(file).first
+ puts " Format: #{img.format}"
+ puts " Geometry: #{img.columns}x#{img.rows}"
+ puts " Class: " + case img.class_type
+ when Magick::DirectClass
+ "DirectClass"
+ when Magick::PseudoClass
+ "PseudoClass"
+ end
+ puts " Depth: #{img.depth} bits-per-pixel"
+ puts " Colors: #{img.number_colors}"
+ puts " Filesize: #{img.filesize}"
+ puts " Resolution: #{img.x_resolution.to_i}x#{img.y_resolution.to_i} "+
+ "pixels/#{img.units == Magick::PixelsPerInchResolution ?
+ "inch" : "centimeter"}"
+ if img.properties.length &gt; 0
+ puts " Properties:"
+ img.properties { |name,value|
+ puts %Q| #{name} = "#{value}"|
+ }
+ end
+ }
+</pre>
+ </td>
+ </tr>
+ </table>
+ <h2>Converting an image to another format</h2>
+ <p>Converting an image to another format is as simple as
+ writing the image to a file. &times;Magick uses the output
+ filename suffix (".jpg" for JPEG, ".gif" for GIF, for example)
+ or prefix ("ps:" for PostScript, for example) to determine the
+ format of the output image.</p>
+ <h2>Making thumbnails</h2>
+ RMagick gives you four different methods for resizing an image:
+ <a href="image.html#Image.resize">resize</a>, <a href=
+ "image.html#Image.sample">sample</a>, <a href=
+ "image.html#Image.scale">scale</a>, and <a href=
+ "image.html#Image.thumbnail">thumbnail</a>. All four are
+ equally easy to use. Specify the number of columns and rows you
+ want the thumbnail to have, like this:
+ <table border="0" width="100%">
+ <tr>
+ <td>
+<pre class="example">
+ img = Image.new "bigimage.gif"
+ thumb = img.scale(125, 125)
+ thumb.write "thumb.gif"
+</pre>
+ </td>
+ </tr>
+ </table>
+ <p>Alternatively, just pass a single <code>Float</code>
+ argument that represents the change in size. For example, to
+ proportionally reduce the size of an image to 25% of its
+ original size, do this:</p>
+<pre class="example">
+ img = Image.new "bigimage.gif"
+ thumb = img.scale(0.25)
+ thumb.write "thumb.gif"
+</pre>
+ <p>The <var>resize</var> method gives you more control by
+ allowing you to specify a <a href=
+ "constants.html#FilterType">filter</a> to use when scaling the
+ image. Some filters produce a better-looking thumbnail at the
+ expense of extra processing time. You can also use a
+ <var>blur</var> argument, which specifies how much blurriness
+ or sharpness the resize method should introduce.</p>
+ <p>The <var>sample</var> method, unlike the other two, does not
+ do any color interpolation when resizing.</p>
+ <p>The <var>thumbnail</var> method is faster than
+ <var>resize</var> if the thumbnail is less than 10% of the size
+ of the original image.</p>
+ <h2>Converting a color image to grayscale</h2>
+ Use the <a href="image.html#Image.quantize">quantize</a> method
+ with the <a href=
+ "constants.html#ColorspaceType">Magick::GRAYColorspace</a>
+ argument. If you want real "grayscale," quantize the image to
+ 256 colors. If you want to convert a color image to
+ black-and-white, use 2 colors. See <a href="demo.rb.html"
+ target="_blank">demo.rb</a>.
+ <h2>Making a drop shadow</h2>
+ <p>Here's one way to make a drop shadow behind text. Use the <a
+ href=
+ "image.html#Image.gaussian_blur"><var>gaussian_blur</var></a>
+ method to blur a light gray copy of the text, position the
+ "shadow" slightly to the right and down, then draw the
+ foreground text slightly to the left and up. <i>(Click the
+ image to see the Ruby program that created it.)</i></p>
+ <div align="center">
+ <a href="drop_shadow.rb.html" target="_blank"><img src=
+ "ex/drop_shadow.gif" alt="drop shadow example"></a>
+ </div>
+ <hr>
+ <table width="100%">
+ <tr>
+ <td style="text-align: left"><a href="imusage.html">&lt;-
+ Prev</a></td>
+ <td style="text-align: center"><a href=
+ "index.html">Contents</a></td>
+ <td style="text-align: right"><a href="magick.html">Next
+ -&gt;</a></td>
+ </tr>
+ </table>
+ </body>
+</html>
1,304 doc/constants.html
@@ -0,0 +1,1304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 1st September 2002), see www.w3.org">
+ <meta http-equiv="CONTENT-TYPE" content=
+ "text/html; charset=iso-8859-1">
+ <title>Constants</title>
+ <link type="text/css" rel="stylesheet" href="rubymgen.css">
+ <style type="text/css">
+ .typename {
+ background-color: #c3c3c3;
+ vertical-align: top;
+ }
+ .typetable {
+ padding-bottom: 1em;
+ }
+ </style>
+ </head>
+ <body>
+ <table width="100%">
+ <tr>
+ <td style="text-align: left"><a href="info.html">&lt;-
+ Prev</a></td>
+ <td style="text-align: center"><a href=
+ "index.html">Contents</a></td>
+ <td style="text-align: right"><a href="index.html">Next
+ -&gt;</a></td>
+ </tr>
+ </table>
+ <table width="100%" cellspacing="0" cellpadding="5">
+ <tr class="stdtitle">
+ <td>Constants</td>
+ </tr>
+ </table>
+ <p align="left">All RMagick constants are defined in the Magick
+ module.</p>
+ <h3>Table of contents</h3>
+ <ul>
+ <li><a href="#Miscellaneous_constants">Miscellaneous
+ constants</a></li>
+ <li><a href="#AlignType">AlignType</a></li>
+ <li><a href="#ChannelType">ChannelType</a></li>
+ <li><a href="#ClassType">ClassType</a></li>
+ <li><a href="#ColorspaceType">ColorspaceType</a></li>
+ <li><a href="#ComplianceType">ComplianceType</a></li>
+ <li><a href="#CompositeOperator">CompositeOperator</a></li>
+ <li><a href="#CompressionType">CompressionType</a></li>
+ <li><a href="#DecorationType">DecorationType</a></li>
+ <li><a href="#DisposeType">DisposeType</a></li>
+ <li><a href="#FilterType">FilterType</a></li>
+ <li><a href="#GravityType">GravityType</a></li>
+ <li><a href="#ImageType">ImageType</a></li>
+ <li><a href="#InterlaceType">InterlaceType</a></li>
+ <li><a href="#NoiseType">NoiseType</a></li>
+ <li><a href="#Opacity">Opacity</a></li>
+ <li><a href="#PaintMethod">PaintMethod</a></li>
+ <li><a href="#RenderingIntent">RenderingIntent</a></li>
+ <li><a href="#ResolutionType">ResolutionType</a></li>
+ <li><a href="#StretchType">StretchType</a></li>
+ <li><a href="#StyleType">StyleType</a></li>
+ <li><a href="#WeightType">WeightType</a></li>
+ </ul>
+ <table>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td colspan="2"><a name=
+ "Miscellaneous_constants"><b>Miscellaneous
+ constants</b></a></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr valign="top">
+ <td>MagickVersion</td>
+ <td>The &times;Magick version string. This has the
+ form:<br>
+ <tt>@(#)ImageMagick X.Y.Z MM/DD/YY Q:16
+ http://www.imagemagick.org</tt><br>
+ or<br>
+ <tt>GraphicsMagick 1.0 05/05/03 Q8
+ http://www.GraphicsMagick.org/</tt></td>
+ </tr>
+ <tr valign="top">
+ <td>MaxRGB</td>
+ <td>The maximum value of a <i>Quantum</i> . A
+ quantum is one of the red, green, blue, or opacity
+ elements of a pixel in the RGB colorspace, or cyan,
+ yellow, magenta, or black elements in the CYMK
+ colorspace. If &times;Magick is built using
+ -DQuantumDepth=16, then MaxRGB is 65535, otherwise
+ it is 255.</td>
+ </tr>
+ <tr valign="top">
+ <td>QuantumDepth</td>
+ <td>The number of bits in a quantum. If
+ &times;Magick is built using -DQuantumDepth=16,
+ then QuantumDepth is 16, otherwise it is 8.</td>
+ </tr>
+ <tr valign="top">
+ <td>Version</td>
+ <td>The RMagick version string. This has the
+ form:<br>
+ <tt>RMagick X.Y.Z</tt></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td colspan="2"><a name=
+ "AlignType"><b>AlignType</b></a> - See <a href=
+ "draw.html#Draw.align_eq">Draw#align=</a>, <a href=
+ "draw.html#Draw.text_align">Draw#text_align</a>.</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr valign="top">
+ <td colspan="2">UndefinedAlign</td>
+ </tr>
+ <tr>
+ <td colspan="2">LeftAlign</td>
+ </tr>
+ <tr>
+ <td colspan="2">CenterAlign</td>
+ </tr>
+ <tr>
+ <td colspan="2">RightAlign</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td width="100%"><a name=
+ "ChannelType"><b>ChannelType</b></a> - see <a href=
+ "image.html#Image.channel">Image#channel</a></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td colspan="2" valign="top">UndefinedChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">RedChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">GreenChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">BlueChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">MagentaChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">YellowChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">BlackChannel</td>
+ </tr>
+ <tr>
+ <td colspan="2" valign="top">OpacityChannel</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td colspan="2">
+ <a name="ClassType"><b>ClassType</b></a> - The
+ ClassType constants specify the image storage
+ class.
+ <p>See <a href=
+ "imageattrs.html#Image.class_type">Image#class_type</a></p>
+ </td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr valign="top">
+ <td>UndefinedClass</td>
+ <td>Unset value</td>
+ </tr>
+ <tr valign="top">
+ <td>DirectClass</td>
+ <td><span class="imquote">Image is composed of
+ pixels which represent literal color
+ values.</span></td>
+ </tr>
+ <tr valign="top">
+ <td>PseudoClass</td>
+ <td><span class="imquote">Image is composed of
+ pixels which specify an index in a color
+ palette.</span></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td colspan="2">
+ <p><a name=
+ "ColorspaceType"><b>ColorspaceType</b></a> - The
+ ColorspaceType constants are <span class=
+ "imquote">used to specify the colorspace that
+ quantization (color reduction and mapping) is
+ done under or to specify the colorspace when
+ encoding an output image. Colorspaces are ways of
+ describing colors to fit the requirements of a
+ particular application (e.g. Television, offset
+ printing, color monitors).&nbsp; Color reduction,
+ by default, takes place in the RGBColorspace.
+ Empirical evidence suggests that distances in
+ color spaces such as YUVColorspace or
+ YIQColorspace correspond to perceptual color
+ differences more closely than do distances in RGB
+ space. These color spaces may give better results
+ when color reducing an image.</span></p>
+ <p><span class="imquote">When encoding an output
+ image, the colorspaces RGBColorspace,
+ CMYKColorspace, and GRAYColorspace may be
+ specified. The CMYKColorspace option is only
+ applicable when writing TIFF, JPEG, and Adobe
+ Photoshop bitmap (PSD) files.</span></p>
+ <p>See <a href=
+ "imageattrs.html#Image.colorspace">Image#colorspace</a></p>
+ </td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr valign="top">
+ <td>UndefinedColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>RGBColorspace</td>
+ <td><span class="imquote">Red-Green-Blue
+ colorspace</span></td>
+ </tr>
+ <tr valign="top">
+ <td>GRAYColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>TransparentColorspace</td>
+ <td><span class="imquote">The Transparent color
+ space behaves uniquely in that it preserves the
+ matte channel of the image if it
+ exists.</span></td>
+ </tr>
+ <tr valign="top">
+ <td>OHTAColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>XYZColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>YCbCrColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>YIQColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>YPbPrColorspace</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>YUVColorspace</td>
+ <td><span class="imquote">Y-signal, U-signal, and
+ V-signal colorspace. YUV is most widely used to
+ encode color for use in television
+ transmission.</span></td>
+ </tr>
+ <tr valign="top">
+ <td>CMYKColorspace</td>
+ <td><span class="imquote">Cyan-Magenta-Yellow-Black
+ colorspace. CYMK is a subtractive color system used
+ by printers and photographers for the rendering of
+ colors with ink or emulsion, normally on a white
+ surface.</span></td>
+ </tr>
+ <tr valign="top">
+ <td>SRGBColorspace</td>
+ <td>In &times;Magick, this constant is named
+ sRGBColorspace</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td colspan="2"><a name=
+ "ComplianceType"><b>ComplianceType</b></a> - see <a
+ href="struct.html#Pixel">Pixel#to_color</a></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr valign="top">
+ <td>SVGCompliance</td>
+ <td>Adhere to SVG color standard.</td>
+ </tr>
+ <tr valign="top">
+ <td>X11Compliance</td>
+ <td>Adhere to X11 color standard.</td>
+ </tr>
+ <tr valign="top">
+ <td>XPMCompliance</td>
+ <td>Adhere to XPM color standard.</td>
+ </tr>
+ <tr valign="top">
+ <td>AllCompliance</td>
+ <td>The union of the 3 color standards.</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="typetable">
+ <td>
+ <table width="100%" border="1" cellpadding="2"
+ cellspacing="3" rules="ALL">
+ <tbody>
+ <tr class="typename">
+ <td colspan="2"><a name=
+ "CompositeOperator"><b>CompositeOperator</b></a> -
+ The CompositeOperator constants are <span class=
+ "imquote">used to select the image composition
+ algorithm used to compose a <var>composite
+ image</var> with a <var>image</var>. By default,
+ each of the <var>composite image</var> pixels are
+ replaced by the corresponding <var>image</var> tile
+ pixel. Specify <var>CompositeOperator</var> to
+ select a different algorithm.</span></td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr valign="top">
+ <td>UndefinedCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>OverCompositeOp</td>
+ <td class="imquote">The result is the union of the
+ the two image shapes with <var>composite
+ image</var> obscuring <var>image</var> in the
+ region of overlap.</td>
+ </tr>
+ <tr valign="top">
+ <td>InCompositeOp</td>
+ <td class="imquote">The result is simply
+ <var>composite image</var> cut by the shape of
+ <var>image</var>. None of the image data of
+ <var>image</var> is included in the result.</td>
+ </tr>
+ <tr valign="top">
+ <td>OutCompositeOp</td>
+ <td class="imquote">The resulting image is
+ <var>composite image</var> with the shape of
+ <var>image</var> cut out.</td>
+ </tr>
+ <tr valign="top">
+ <td>AtopCompositeOp</td>
+ <td class="imquote">The result is the same shape as
+ <var>image</var>, with <var>composite image</var>
+ obscuring <var>image</var> where the image shapes
+ overlap. Note that this differs from
+ OverCompositeOp because the portion of
+ <var>composite image</var> outside of
+ <var>image</var>'s shape does not appear in the
+ result.</td>
+ </tr>
+ <tr valign="top">
+ <td>XorCompositeOp</td>
+ <td class="imquote">The result is the image data
+ from both <var>composite image</var> and
+ <var>image</var> that is outside the overlap
+ region. The overlap region will be blank.</td>
+ </tr>
+ <tr valign="top">
+ <td>PlusCompositeOp</td>
+ <td class="imquote">The result is just the sum of
+ the&nbsp;image data. Output values are cropped to
+ 255 (no overflow). This operation is independent of
+ the matte channels.</td>
+ </tr>
+ <tr valign="top">
+ <td>MinusCompositeOp</td>
+ <td class="imquote">The result of <var>composite
+ image</var> - <var>image</var>, with overflow
+ cropped to zero. The matte chanel is ignored (set
+ to 255, full coverage).</td>
+ </tr>
+ <tr valign="top">
+ <td>AddCompositeOp</td>
+ <td class="imquote">The result of <var>composite
+ image</var> + <var>image</var>, with overflow
+ wrapping around (mod 256).</td>
+ </tr>
+ <tr valign="top">
+ <td>SubtractCompositeOp</td>
+ <td class="imquote">The result of <var>composite
+ image</var> - <var>image</var>, with underflow
+ wrapping around (mod 256). The add and subtract
+ operators can be used to perform reversable
+ transformations.</td>
+ </tr>
+ <tr valign="top">
+ <td>DifferenceCompositeOp</td>
+ <td class="imquote">The result of
+ abs(<var>composite image</var> - <var>image</var>).
+ This is useful for comparing two very similar
+ images.</td>
+ </tr>
+ <tr valign="top">
+ <td>MultiplyCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>BumpmapCompositeOp</td>
+ <td class="imquote">The result <var>image</var>
+ shaded by <var>composite image</var>.</td>
+ </tr>
+ <tr valign="top">
+ <td>CopyCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>CopyRedCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>CopyGreenCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>CopyBlueCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>CopyOpacityCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>ClearCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>DissolveCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>DisplaceCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>ModulateCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>ThresholdCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>NoCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>DarkenCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">
+ <td>LightenCompositeOp</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr valign="top">