Permalink
Browse files

Add Image#convolve_channel

  • Loading branch information...
1 parent 7b7bb20 commit 60652264dcc6d20164f8f96098e101a4e6c878aa rmagick committed Jun 15, 2004
Showing with 189 additions and 36 deletions.
  1. +2 −1 ChangeLog
  2. +1 −0 configure.ac
  3. +64 −5 doc/image1.html
  4. +2 −1 doc/usage.html
  5. +3 −1 ext/RMagick/rmagick.h
  6. +1 −0 ext/RMagick/rmagick_config.h.in
  7. +97 −25 ext/RMagick/rmimage.c
  8. +3 −2 ext/RMagick/rmmain.c
  9. +16 −1 ext/RMagick/rmutil.c
View
@@ -1,5 +1,6 @@
RMagick 1.6.0
- o Added posterize, gaussian_blur_channel methods to Image class (ImageMagick 6.0.0)
+ o Added posterize, gaussian_blur_channel, convolve_channel methods to Image class
+ (ImageMagick 6.0.0)
o Added trim and trim! methods to Image class
RMagick 1.5.0
View
@@ -89,6 +89,7 @@ AC_CHECK_FUNCS([RadialBlurImage RandomThresholdImageChannel SeparateImageChannel
AC_CHECK_FUNCS([QuantumOperatorRegionImage GetImageStatistics])
AC_CHECK_FUNCS([GetColorInfoList GetTypeInfoList GetMagickInfoList])
AC_CHECK_FUNCS([EvaluateImageChannel PosterizeImage GaussianBlurImageChannel])
+AC_CHECK_FUNCS([ConvolveImageChannel])
# What typedefs?
AC_CHECK_TYPES([DisposeType,
View
@@ -169,6 +169,8 @@ <h6 id="header">RMagick User's Guide and Reference</h6>
<li><a href="#convolve">convolve</a></li>
+ <li><a href="#convolve_channel">convolve_channel</a></li>
+
<li><a href="#copy">copy</a></li>
<li><a href="#crop">crop</a></li>
@@ -1719,7 +1721,9 @@ <h3 id="colorize">colorize</h3>
structure</dd>
</dl>
- <h4>Returns</h4>A new image
+ <h4>Returns</h4>
+
+ <p>A new image</p>
<h4>Example</h4>
@@ -2200,11 +2204,14 @@ <h3 id="convolve">convolve</h3>
"arg">order</span> matrix of <code>Float</code> values.</dd>
</dl>
- <h4>Returns</h4>A new image
+ <h4>Returns</h4>
+
+ <p>A new image</p>
<h4>See also</h4>
- <p>The <a href="#edge">edge</a>, <a href=
+ <p><a href="#convolve_channel">convolve_channel</a>. The
+ <a href="#edge">edge</a>, <a href=
"image2.html#emboss">emboss</a>, <a href=
"image2.html#gaussian_blur">gaussian_blur</a>, <a href=
"image2.html#motion_blur">motion_blur</a> and <a href=
@@ -2225,6 +2232,54 @@ <h3 id="convolve">convolve</h3>
</div>
<div class="sig">
+ <h3 id="convolve_channel">convolve_channel</h3>
+
+ <p><span class="arg">image</span>.convolve_channel(<span class=
+ "arg">order</span>, <span class="arg">kernel</span>[,
+ <span class="arg">channel</span>[, <span class=
+ "arg">channel</span>...]]) -&gt; <em>anImage</em></p>
+ </div>
+
+ <div class="desc">
+ <h4>Description</h4>
+
+ <p>Applies a custom convolution kernel to the specified channel
+ or channels in the image.</p>
+
+ <h4>Arguments</h4>
+
+ <dl>
+ <dt>order</dt>
+
+ <dd>The number of columns and rows in the kernel.</dd>
+
+ <dt>kernel</dt>
+
+ <dd>An <span class="arg">order</span>*<span class=
+ "arg">order</span> matrix of <code>Float</code> values.</dd>
+
+ <dt>channel...</dt>
+
+ <dd>0 or more <a href=
+ "constants.html#ChannelType">ChannelType</a> arguments. If no
+ channels are specified the effect is the same as calling
+ <a href="#convolve">convolve</a>.</dd>
+ </dl>
+
+ <h4>Returns</h4>
+
+ <p>A new image</p>
+
+ <h4>Magick API</h4>
+
+ <p>ConvolveImageChannel (available in ImageMagick 6.0.0)</p>
+
+ <h4>See also</h4>
+
+ <p><a href="#convolve">convolve</a></p>
+ </div>
+
+ <div class="sig">
<h3 id="copy">copy</h3>
<p><span class="arg">image</span>.copy -&gt;
@@ -2386,7 +2441,9 @@ <h3 id="crop">crop</h3>
</dd>
</dl>
- <h4>Returns</h4>A new image
+ <h4>Returns</h4>
+
+ <p>A new image</p>
<h4>Example</h4>
@@ -2733,7 +2790,9 @@ <h3 id="edge">edge</h3>
<h4>Arguments</h4>The radius of the convolution filter. If the
radius is 0, <code>edge</code> selects a suitable default.
- <h4>Returns</h4>A new image
+ <h4>Returns</h4>
+
+ <p>A new image</p>
<h4>Example</h4>
View
@@ -894,7 +894,8 @@ <h2 id="modifying">Examining and modifying images</h2>
<dd>Blend the fill color with each pixel in the image</dd>
- <dt><a href="image1.html#convolve">convolve</a></dt>
+ <dt><a href="image1.html#convolve">convolve</a>, <a href=
+ "image1.html#convolve_channel">convolve_channel</a></dt>
<dd>Apply a custom convolution kernel to the image</dd>
View
@@ -1,4 +1,4 @@
-/* $Id: rmagick.h,v 1.55 2004/06/15 00:01:50 rmagick Exp $ */
+/* $Id: rmagick.h,v 1.56 2004/06/15 17:27:59 rmagick Exp $ */
/*=============================================================================
| Copyright (C) 2004 by Timothy P. Hunter
| Name: rmagick.h
@@ -650,6 +650,7 @@ extern VALUE Image_compress_colormap_bang(VALUE);
extern VALUE Image_constitute(VALUE, VALUE, VALUE, VALUE, VALUE);
extern VALUE Image_contrast(int, VALUE *, VALUE);
extern VALUE Image_convolve(VALUE, VALUE, VALUE);
+extern VALUE Image_convolve_channel(int, VALUE *, VALUE);
extern VALUE Image_copy(VALUE);
extern VALUE Image_crop(int, VALUE *, VALUE);
extern VALUE Image_crop_bang(int, VALUE *, VALUE);
@@ -870,6 +871,7 @@ extern VALUE Enum_case_eq(VALUE, VALUE);
extern char *rm_string_value_ptr(volatile VALUE *);
#endif
extern char *rm_string_value_ptr_len(volatile VALUE *, long *);
+void rm_check_ary_len(VALUE, int);
extern void rm_check_frozen(VALUE);
extern VALUE rm_obj_to_s(VALUE);
double rm_fuzz_to_dbl(VALUE fuzz);
@@ -8,6 +8,7 @@
#undef HAVE_BILEVELIMAGECHANNEL
#undef HAVE_BLACKTHRESHOLDIMAGE
#undef HAVE_COMPAREIMAGECHANNELS
+#undef HAVE_CONVOLVEIMAGECHANNEL
#undef HAVE_COPYCYANCOMPOSITEOP
#undef HAVE_DISPOSETYPE
#undef HAVE_EVALUATEIMAGECHANNEL
Oops, something went wrong.

0 comments on commit 6065226

Please sign in to comment.