rmagick 5.4.4 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +15 -0
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +16 -8
- data/CHANGELOG.md +43 -0
- data/Gemfile +20 -0
- data/Rakefile +11 -0
- data/before_install_osx.sh +1 -1
- data/ext/RMagick/extconf.rb +24 -6
- data/ext/RMagick/rmagick.h +3 -1
- data/ext/RMagick/rmdraw.cpp +10 -10
- data/ext/RMagick/rmfill.cpp +4 -4
- data/ext/RMagick/rmilist.cpp +10 -2
- data/ext/RMagick/rmimage.cpp +321 -294
- data/ext/RMagick/rminfo.cpp +22 -21
- data/ext/RMagick/rmkinfo.cpp +5 -18
- data/ext/RMagick/rmmain.cpp +30 -64
- data/ext/RMagick/rmmontage.cpp +5 -5
- data/ext/RMagick/rmpixel.cpp +1 -1
- data/ext/RMagick/rmutil.cpp +31 -71
- data/lib/rmagick/version.rb +1 -1
- data/lib/rmagick_internal.rb +67 -65
- data/lib/rvg/embellishable.rb +6 -2
- data/lib/rvg/misc.rb +7 -7
- data/lib/rvg/rvg.rb +2 -0
- data/lib/rvg/stretchable.rb +2 -2
- data/lib/rvg/transformable.rb +1 -1
- data/rmagick.gemspec +1 -13
- data/sig/rmagick/_draw_common_methods.rbs +64 -0
- data/sig/rmagick/_image_common_methods.rbs +389 -0
- data/sig/rmagick/draw.rbs +38 -0
- data/sig/rmagick/draw_attribute.rbs +28 -0
- data/sig/rmagick/enum.rbs +814 -0
- data/sig/rmagick/error.rbs +11 -0
- data/sig/rmagick/fill.rbs +21 -0
- data/sig/rmagick/geometry.rbs +14 -0
- data/sig/rmagick/image.rbs +194 -0
- data/sig/rmagick/image_list.rbs +181 -0
- data/sig/rmagick/iptc.rbs +101 -0
- data/sig/rmagick/kernel_info.rbs +12 -0
- data/sig/rmagick/optional_method_arguments.rbs +10 -0
- data/sig/rmagick/pixel.rbs +46 -0
- data/sig/rmagick/struct.rbs +90 -0
- data/sig/rmagick.rbs +43 -0
- data/sig/rvg/clippath.rbs +34 -0
- data/sig/rvg/container.rbs +78 -0
- data/sig/rvg/deep_equal.rbs +48 -0
- data/sig/rvg/describable.rbs +30 -0
- data/sig/rvg/embellishable.rbs +226 -0
- data/sig/rvg/misc.rbs +145 -0
- data/sig/rvg/paint.rbs +55 -0
- data/sig/rvg/pathdata.rbs +77 -0
- data/sig/rvg/rvg.rbs +125 -0
- data/sig/rvg/stretchable.rbs +56 -0
- data/sig/rvg/stylable.rbs +66 -0
- data/sig/rvg/text.rbs +118 -0
- data/sig/rvg/transformable.rbs +59 -0
- data/sig/rvg/units.rbs +33 -0
- metadata +32 -128
data/ext/RMagick/rmimage.cpp
CHANGED
@@ -449,8 +449,8 @@ adaptive_channel_method(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
449
449
|
* than sigma. Use a radius of 0 and adaptive_blur selects a suitable radius for you.
|
450
450
|
*
|
451
451
|
* @overload adaptive_blur(radius = 0.0, sigma = 1.0)
|
452
|
-
* @param radius [
|
453
|
-
* @param sigma [
|
452
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
453
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
454
454
|
* @return [Magick::Image] a new image
|
455
455
|
*/
|
456
456
|
VALUE
|
@@ -464,13 +464,13 @@ Image_adaptive_blur(int argc, VALUE *argv, VALUE self)
|
|
464
464
|
* The same as {Magick::Image#adaptive_blur} except only the specified channels are blurred.
|
465
465
|
*
|
466
466
|
* @overload adaptive_blur_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
467
|
-
* @param radius [
|
468
|
-
* @param sigma [
|
467
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
468
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
469
469
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
470
470
|
*
|
471
471
|
* @overload adaptive_blur_channel(radius = 0.0, sigma = 1.0, *channels)
|
472
|
-
* @param radius [
|
473
|
-
* @param sigma [
|
472
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
473
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
474
474
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
475
475
|
*
|
476
476
|
* @return [Magick::Image] a new image
|
@@ -490,7 +490,7 @@ Image_adaptive_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
490
490
|
* Resizes the image with data dependent triangulation.
|
491
491
|
*
|
492
492
|
* @overload adaptive_resize(scale_val)
|
493
|
-
* @param scale_val [
|
493
|
+
* @param scale_val [Numeric] You can use this argument instead of specifying the desired width and
|
494
494
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
495
495
|
* the receiver.
|
496
496
|
*
|
@@ -557,8 +557,8 @@ Image_adaptive_resize(int argc, VALUE *argv, VALUE self)
|
|
557
557
|
* Use a radius of 0 and adaptive_sharpen selects a suitable radius for you.
|
558
558
|
*
|
559
559
|
* @overload adaptive_sharpen(radius = 0.0, sigma = 1.0)
|
560
|
-
* @param radius [
|
561
|
-
* @param sigma [
|
560
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
561
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
562
562
|
* @return [Magick::Image] a new image
|
563
563
|
*/
|
564
564
|
VALUE
|
@@ -572,13 +572,13 @@ Image_adaptive_sharpen(int argc, VALUE *argv, VALUE self)
|
|
572
572
|
* The same as {Magick::Image#adaptive_sharpen} except only the specified channels are sharpened.
|
573
573
|
*
|
574
574
|
* @overload adaptive_sharpen_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
575
|
-
* @param radius [
|
576
|
-
* @param sigma [
|
575
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
576
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
577
577
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
578
578
|
*
|
579
579
|
* @overload adaptive_sharpen_channel(radius = 0.0, sigma = 1.0, *channels)
|
580
|
-
* @param radius [
|
581
|
-
* @param sigma [
|
580
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
581
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
582
582
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
583
583
|
*
|
584
584
|
* @return [Magick::Image] a new image
|
@@ -646,7 +646,7 @@ Image_adaptive_threshold(int argc, VALUE *argv, VALUE self)
|
|
646
646
|
* The areas of the destination image that are masked by white pixels will be modified by the
|
647
647
|
* {Magick::Image#composite} method, while areas masked by black pixels are unchanged.
|
648
648
|
*
|
649
|
-
* @param mask [Magick::Image] the composite mask
|
649
|
+
* @param mask [Magick::Image, Magick::ImageList] the composite mask
|
650
650
|
* @see Image#mask
|
651
651
|
* @see Image#delete_compose_mask
|
652
652
|
*/
|
@@ -660,7 +660,7 @@ Image_add_compose_mask(VALUE self, VALUE mask)
|
|
660
660
|
#endif
|
661
661
|
|
662
662
|
image = rm_check_frozen(self);
|
663
|
-
mask_image = rm_check_destroyed(mask);
|
663
|
+
mask_image = rm_check_destroyed(rm_cur_image(mask));
|
664
664
|
if (image->columns != mask_image->columns || image->rows != mask_image->rows)
|
665
665
|
{
|
666
666
|
rb_raise(rb_eArgError, "mask must be the same size as image");
|
@@ -972,12 +972,12 @@ Image_affine_transform(VALUE self, VALUE affine)
|
|
972
972
|
* "Comment", "Signature", and in some cases "EXIF".
|
973
973
|
*
|
974
974
|
* @param key_arg [String, Symbol] the key to get
|
975
|
-
* @return [String] property value or nil if key doesn't exist
|
975
|
+
* @return [String, nil] property value or nil if key doesn't exist
|
976
976
|
* @see Image#[]=
|
977
977
|
* @see Image#properties
|
978
978
|
*/
|
979
979
|
VALUE
|
980
|
-
Image_aref(VALUE self, VALUE key_arg)
|
980
|
+
Image_aref(VALUE self, VALUE key_arg)
|
981
981
|
{
|
982
982
|
Image *image;
|
983
983
|
const char *key;
|
@@ -1352,7 +1352,7 @@ Image_background_color_eq(VALUE self, VALUE color)
|
|
1352
1352
|
/**
|
1353
1353
|
* Return the number of rows (before transformations).
|
1354
1354
|
*
|
1355
|
-
* @return [
|
1355
|
+
* @return [Integer] the number of rows
|
1356
1356
|
*/
|
1357
1357
|
VALUE
|
1358
1358
|
Image_base_columns(VALUE self)
|
@@ -1383,7 +1383,7 @@ Image_base_filename(VALUE self)
|
|
1383
1383
|
/**
|
1384
1384
|
* Return the number of rows (before transformations).
|
1385
1385
|
*
|
1386
|
-
* @return [
|
1386
|
+
* @return [Integer] the number of rows
|
1387
1387
|
*/
|
1388
1388
|
VALUE
|
1389
1389
|
Image_base_rows(VALUE self)
|
@@ -1429,8 +1429,8 @@ Image_bias(VALUE self)
|
|
1429
1429
|
/**
|
1430
1430
|
* Set image bias (used when convolving an image).
|
1431
1431
|
*
|
1432
|
-
* @param pct [
|
1433
|
-
* @return [
|
1432
|
+
* @param pct [Numeric, String] Either a number between 0.0 and 1.0 or a string in the form "NN%"
|
1433
|
+
* @return [Numeric, String] the given value
|
1434
1434
|
*/
|
1435
1435
|
VALUE
|
1436
1436
|
Image_bias_eq(VALUE self, VALUE pct)
|
@@ -1460,10 +1460,11 @@ Image_bias_eq(VALUE self, VALUE pct)
|
|
1460
1460
|
* is a high-contrast image.
|
1461
1461
|
*
|
1462
1462
|
* @overload bilevel_channel(threshold, channel = Magick::AllChannels)
|
1463
|
-
* @param threshold [
|
1463
|
+
* @param threshold [Numeric] The threshold value, a number between 0 and QuantumRange.
|
1464
|
+
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
1464
1465
|
*
|
1465
1466
|
* @overload bilevel_channel(threshold, *channels)
|
1466
|
-
* @param threshold [
|
1467
|
+
* @param threshold [Numeric] The threshold value, a number between 0 and QuantumRange.
|
1467
1468
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
1468
1469
|
*
|
1469
1470
|
* @return [Magick::Image] a new image
|
@@ -1923,10 +1924,10 @@ special_composite(Image *image, Image *overlay, double image_pct, double overlay
|
|
1923
1924
|
* @overload blend(overlay, src_percent, dst_percent, gravity = Magick::NorthWestGravity, x_offset = 0, y_offset = 0)
|
1924
1925
|
* @param overlay [Magick::Image, Magick::ImageList] The source image for the composite operation.
|
1925
1926
|
* Either an imagelist or an image. If an imagelist, uses the current image.
|
1926
|
-
* @param src_percent [
|
1927
|
+
* @param src_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
1927
1928
|
* If src_percentage is a number it is interpreted as a percentage.
|
1928
1929
|
* Both 0.25 and "25%" mean 25%. This argument is required.
|
1929
|
-
* @param dst_percent [
|
1930
|
+
* @param dst_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
1930
1931
|
* If src_percentage is a number it is interpreted as a percentage.
|
1931
1932
|
* Both 0.25 and "25%" mean 25%. This argument may omitted if no other arguments follow it.
|
1932
1933
|
* In this case the default is 100%-src_percentage.
|
@@ -1988,7 +1989,7 @@ Image_blend(int argc, VALUE *argv, VALUE self)
|
|
1988
1989
|
* Simulate a scene at nighttime in the moonlight.
|
1989
1990
|
*
|
1990
1991
|
* @overload blue_shift(factor = 1.5)
|
1991
|
-
* @param factor [
|
1992
|
+
* @param factor [Numeric] Larger values increase the effect.
|
1992
1993
|
* @return [Magick::Image] a new image
|
1993
1994
|
*/
|
1994
1995
|
VALUE
|
@@ -2027,13 +2028,13 @@ Image_blue_shift(int argc, VALUE *argv, VALUE self)
|
|
2027
2028
|
* Convolves the image with a Gaussian operator of the given radius and standard deviation (sigma).
|
2028
2029
|
*
|
2029
2030
|
* @overload blur_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
2030
|
-
* @param radius [
|
2031
|
-
* @param sigma [
|
2031
|
+
* @param radius [Numeric] the radius value
|
2032
|
+
* @param sigma [Numeric] the sigma value
|
2032
2033
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
2033
2034
|
*
|
2034
2035
|
* @overload blur_channel(radius = 0.0, sigma = 1.0, *channels)
|
2035
|
-
* @param radius [
|
2036
|
-
* @param sigma [
|
2036
|
+
* @param radius [Numeric] the radius value
|
2037
|
+
* @param sigma [Numeric] the sigma value
|
2037
2038
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2038
2039
|
*
|
2039
2040
|
* @return [Magick::Image] a new image
|
@@ -2085,8 +2086,8 @@ Image_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
2085
2086
|
* Blur the image.
|
2086
2087
|
*
|
2087
2088
|
* @overload blur_image(radius = 0.0, sigma = 1.0)
|
2088
|
-
* @param radius [
|
2089
|
-
* @param sigma [
|
2089
|
+
* @param radius [Numeric] the radius value
|
2090
|
+
* @param sigma [Numeric] the sigma value
|
2090
2091
|
* @return [Magick::Image] a new image
|
2091
2092
|
*/
|
2092
2093
|
VALUE
|
@@ -2264,7 +2265,8 @@ Image_bounding_box(VALUE self)
|
|
2264
2265
|
* importantly, you can capture menus or other popups that are independent windows but appear
|
2265
2266
|
* over the specified window.
|
2266
2267
|
* @param borders [Boolean] If true, include the border in the image.
|
2267
|
-
* @yield [
|
2268
|
+
* @yield [info]
|
2269
|
+
* @yieldparam info [Magick::Image::Info]
|
2268
2270
|
*
|
2269
2271
|
* @return [Magick::Image] a new image
|
2270
2272
|
* @example
|
@@ -2337,10 +2339,10 @@ Image_capture(int argc, VALUE *argv, VALUE self ATTRIBUTE_UNUSED)
|
|
2337
2339
|
* For example, you can specify that the image should be resized such that the aspect ratio should
|
2338
2340
|
* be retained but the resulting image should be no larger than 640 pixels wide and 480 pixels tall.
|
2339
2341
|
*
|
2340
|
-
* @param geom_arg [String] the geometry
|
2342
|
+
* @param geom_arg [Magick::Geometry, String] the geometry
|
2341
2343
|
* @yield [column, row, image]
|
2342
|
-
* @yieldparam column [
|
2343
|
-
* @yieldparam row [
|
2344
|
+
* @yieldparam column [Integer] The desired column size
|
2345
|
+
* @yieldparam row [Integer] The desired row size
|
2344
2346
|
* @yieldparam image [Magick::Image] self
|
2345
2347
|
* @see https://www.imagemagick.org/Magick++/Geometry.html
|
2346
2348
|
* @example
|
@@ -2445,7 +2447,7 @@ Image_channel(VALUE self, VALUE channel_arg)
|
|
2445
2447
|
* @overload channel_depth(*channels)
|
2446
2448
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2447
2449
|
*
|
2448
|
-
* @return [
|
2450
|
+
* @return [Integer] the channel depth
|
2449
2451
|
*/
|
2450
2452
|
VALUE
|
2451
2453
|
Image_channel_depth(int argc, VALUE *argv, VALUE self)
|
@@ -2492,7 +2494,7 @@ Image_channel_depth(int argc, VALUE *argv, VALUE self)
|
|
2492
2494
|
* @overload channel_extrema(*channels)
|
2493
2495
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2494
2496
|
*
|
2495
|
-
* @return [Array<
|
2497
|
+
* @return [Array<Integer>] The first element in the array is the minimum value. The second element is the
|
2496
2498
|
* maximum value.
|
2497
2499
|
*/
|
2498
2500
|
VALUE
|
@@ -2656,8 +2658,8 @@ Image_channel_entropy(int argc ATTRIBUTE_UNUSED, VALUE *argv ATTRIBUTE_UNUSED, V
|
|
2656
2658
|
* Return a new image that is a copy of the input image with the edges highlighted.
|
2657
2659
|
*
|
2658
2660
|
* @overload charcoal(radius = 0.0, sigma = 1.0)
|
2659
|
-
* @param radius [
|
2660
|
-
* @param sigma [
|
2661
|
+
* @param radius [Numeric] The radius of the pixel neighborhood.
|
2662
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian, in pixels.
|
2661
2663
|
* @return [Magick::Image] a new image
|
2662
2664
|
*/
|
2663
2665
|
VALUE
|
@@ -2763,11 +2765,11 @@ Image_clone(VALUE self)
|
|
2763
2765
|
* the CLUT image.
|
2764
2766
|
*
|
2765
2767
|
* @overload clut_channel(clut_image, channel = Magick::AllChannels)
|
2766
|
-
* @param clut_image [Magick::Image] The LUT gradient image.
|
2768
|
+
* @param clut_image [Magick::Image, Magick::ImageList] The LUT gradient image.
|
2767
2769
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
2768
2770
|
*
|
2769
2771
|
* @overload clut_channel(clut_image, *channels)
|
2770
|
-
* @param clut_image [Magick::Image] The LUT gradient image.
|
2772
|
+
* @param clut_image [Magick::Image, Magick::ImageList] The LUT gradient image.
|
2771
2773
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2772
2774
|
*
|
2773
2775
|
* @return [Magick::Image] self
|
@@ -2787,7 +2789,7 @@ Image_clut_channel(int argc, VALUE *argv, VALUE self)
|
|
2787
2789
|
// check_destroyed before confirming the arguments
|
2788
2790
|
if (argc >= 1)
|
2789
2791
|
{
|
2790
|
-
rm_check_destroyed(argv[0]);
|
2792
|
+
clut = rm_check_destroyed(rm_cur_image(argv[0]));
|
2791
2793
|
channels = extract_channels(&argc, argv);
|
2792
2794
|
if (argc != 1)
|
2793
2795
|
{
|
@@ -2799,8 +2801,6 @@ Image_clut_channel(int argc, VALUE *argv, VALUE self)
|
|
2799
2801
|
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or more)", argc);
|
2800
2802
|
}
|
2801
2803
|
|
2802
|
-
TypedData_Get_Struct(argv[0], Image, &rm_image_data_type, clut);
|
2803
|
-
|
2804
2804
|
#if defined(IMAGEMAGICK_7)
|
2805
2805
|
exception = AcquireExceptionInfo();
|
2806
2806
|
BEGIN_CHANNEL_MASK(image, channels);
|
@@ -2829,7 +2829,7 @@ Image_clut_channel(int argc, VALUE *argv, VALUE self)
|
|
2829
2829
|
/**
|
2830
2830
|
* Computes the number of times each unique color appears in the image.
|
2831
2831
|
*
|
2832
|
-
* @return [Hash] Each key in the hash is a pixel representing a color that appears in the image.
|
2832
|
+
* @return [Hash<Magick::Pixel, Integer>] Each key in the hash is a pixel representing a color that appears in the image.
|
2833
2833
|
* The value associated with the key is the number of times that color appears in the image.
|
2834
2834
|
*/
|
2835
2835
|
VALUE
|
@@ -3052,8 +3052,8 @@ Image_color_profile(VALUE self)
|
|
3052
3052
|
* - Pass nil to remove any existing profile.
|
3053
3053
|
* - Removes any existing profile before adding the new one.
|
3054
3054
|
*
|
3055
|
-
* @param profile [String] the profile to set
|
3056
|
-
* @return [String] the given profile
|
3055
|
+
* @param profile [String, nil] the profile to set
|
3056
|
+
* @return [String, nil] the given profile
|
3057
3057
|
*/
|
3058
3058
|
VALUE
|
3059
3059
|
Image_color_profile_eq(VALUE self, VALUE profile)
|
@@ -3165,16 +3165,16 @@ Image_color_flood_fill(VALUE self, VALUE target_color, VALUE fill_color,
|
|
3165
3165
|
* blend for each r, g, b component.
|
3166
3166
|
*
|
3167
3167
|
* @overload colorize(red, green, blue, target)
|
3168
|
-
* @param red [
|
3169
|
-
* @param green [
|
3170
|
-
* @param blue [
|
3168
|
+
* @param red [Numeric] The percentage of the fill color red
|
3169
|
+
* @param green [Numeric] The percentage of the fill color green
|
3170
|
+
* @param blue [Numeric] The percentage of the fill color blue
|
3171
3171
|
* @param target [Magick::Pixel, String] the color name
|
3172
3172
|
*
|
3173
3173
|
* @overload colorize(red, green, blue, matte, target)
|
3174
|
-
* @param red [
|
3175
|
-
* @param green [
|
3176
|
-
* @param blue [
|
3177
|
-
* @param matte [
|
3174
|
+
* @param red [Numeric] The percentage of the fill color red
|
3175
|
+
* @param green [Numeric] The percentage of the fill color green
|
3176
|
+
* @param blue [Numeric] The percentage of the fill color blue
|
3177
|
+
* @param matte [Numeric] The percentage of the fill color transparency
|
3178
3178
|
* @param target [Magick::Pixel, String] the color name
|
3179
3179
|
*
|
3180
3180
|
* @return [Magick::Image] a new image
|
@@ -3323,7 +3323,7 @@ Image_colormap(int argc, VALUE *argv, VALUE self)
|
|
3323
3323
|
/**
|
3324
3324
|
* Get the number of colors in the colormap.
|
3325
3325
|
*
|
3326
|
-
* @return [
|
3326
|
+
* @return [Integer] the number of colors
|
3327
3327
|
*/
|
3328
3328
|
VALUE
|
3329
3329
|
Image_colors(VALUE self)
|
@@ -3385,7 +3385,7 @@ Image_colorspace_eq(VALUE self, VALUE colorspace)
|
|
3385
3385
|
/**
|
3386
3386
|
* Get image columns.
|
3387
3387
|
*
|
3388
|
-
* @return [
|
3388
|
+
* @return [Integer] the columns
|
3389
3389
|
*/
|
3390
3390
|
VALUE
|
3391
3391
|
Image_columns(VALUE self)
|
@@ -3415,13 +3415,13 @@ Image_columns(VALUE self)
|
|
3415
3415
|
* imagelist, uses the current image.
|
3416
3416
|
* @param metric [Magick::MetricType] The desired distortion metric.
|
3417
3417
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
3418
|
-
* @yield [
|
3418
|
+
* @yield [opt_args]
|
3419
|
+
* @yieldparam opt_args [Magick::OptionalMethodArguments]
|
3419
3420
|
*
|
3420
3421
|
* @overload compare_channel(image, metric, *channels)
|
3421
3422
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
3422
3423
|
* imagelist, uses the current image.
|
3423
3424
|
* @param metric [Magick::MetricType] The desired distortion metric.
|
3424
|
-
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
3425
3425
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
3426
3426
|
*
|
3427
3427
|
* @overload compare_channel(image, metric, *channels)
|
@@ -3434,9 +3434,9 @@ Image_columns(VALUE self)
|
|
3434
3434
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
3435
3435
|
* imagelist, uses the current image.
|
3436
3436
|
* @param metric [Magick::MetricType] The desired distortion metric.
|
3437
|
-
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
3438
3437
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
3439
|
-
* @yield [
|
3438
|
+
* @yield [opt_args]
|
3439
|
+
* @yieldparam opt_args [Magick::OptionalMethodArguments]
|
3440
3440
|
*
|
3441
3441
|
* @return [Array] The first element is a difference image, the second is a the value of the
|
3442
3442
|
* computed distortion represented as a Float.
|
@@ -3797,7 +3797,7 @@ Image_composite(int argc, VALUE *argv, VALUE self)
|
|
3797
3797
|
/**
|
3798
3798
|
* Composite the source over the destination image as dictated by the affine transform.
|
3799
3799
|
*
|
3800
|
-
* @param source [Magick::Image] the source image
|
3800
|
+
* @param source [Magick::Image, Magick::ImageList] the source image
|
3801
3801
|
* @param affine_matrix [Magick::AffineMatrix] affine transform matrix
|
3802
3802
|
* @return [Magick::Image] a new image
|
3803
3803
|
*/
|
@@ -3811,7 +3811,7 @@ Image_composite_affine(VALUE self, VALUE source, VALUE affine_matrix)
|
|
3811
3811
|
#endif
|
3812
3812
|
|
3813
3813
|
image = rm_check_destroyed(self);
|
3814
|
-
composite_image = rm_check_destroyed(source);
|
3814
|
+
composite_image = rm_check_destroyed(rm_cur_image(source));
|
3815
3815
|
|
3816
3816
|
Export_AffineMatrix(&affine, affine_matrix);
|
3817
3817
|
new_image = rm_clone_image(image);
|
@@ -4027,19 +4027,19 @@ Image_composite_channel_bang(int argc, VALUE *argv, VALUE self)
|
|
4027
4027
|
* @overload composite_mathematics(image, a, b, c, d, gravity)
|
4028
4028
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
4029
4029
|
* imagelist, uses the current image.
|
4030
|
-
* @param a [
|
4031
|
-
* @param b [
|
4032
|
-
* @param c [
|
4033
|
-
* @param d [
|
4030
|
+
* @param a [Numeric] See the description.
|
4031
|
+
* @param b [Numeric] See the description.
|
4032
|
+
* @param c [Numeric] See the description.
|
4033
|
+
* @param d [Numeric] See the description.
|
4034
4034
|
* @param gravity [Magick::GravityType] the gravity type
|
4035
4035
|
*
|
4036
4036
|
* @overload composite_mathematics(image, a, b, c, d, x_off, y_off)
|
4037
4037
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
4038
4038
|
* imagelist, uses the current image.
|
4039
|
-
* @param a [
|
4040
|
-
* @param b [
|
4041
|
-
* @param c [
|
4042
|
-
* @param d [
|
4039
|
+
* @param a [Numeric] See the description.
|
4040
|
+
* @param b [Numeric] See the description.
|
4041
|
+
* @param c [Numeric] See the description.
|
4042
|
+
* @param d [Numeric] See the description.
|
4043
4043
|
* @param x_off [Numeric] The x-offset of the composited image, measured relative to the gravity
|
4044
4044
|
* argument.
|
4045
4045
|
* @param y_off [Numeric] The y-offset of the composited image, measured relative to the gravity
|
@@ -4048,10 +4048,10 @@ Image_composite_channel_bang(int argc, VALUE *argv, VALUE self)
|
|
4048
4048
|
* @overload composite_mathematics(image, a, b, c, d, gravity, x_off, y_off)
|
4049
4049
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
4050
4050
|
* imagelist, uses the current image.
|
4051
|
-
* @param a [
|
4052
|
-
* @param b [
|
4053
|
-
* @param c [
|
4054
|
-
* @param d [
|
4051
|
+
* @param a [Numeric] See the description.
|
4052
|
+
* @param b [Numeric] See the description.
|
4053
|
+
* @param c [Numeric] See the description.
|
4054
|
+
* @param d [Numeric] See the description.
|
4055
4055
|
* @param gravity [Magick::GravityType] the gravity type
|
4056
4056
|
* @param x_off [Numeric] The x-offset of the composited image, measured relative to the gravity
|
4057
4057
|
* argument.
|
@@ -4582,7 +4582,7 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4582
4582
|
}
|
4583
4583
|
else
|
4584
4584
|
{
|
4585
|
-
*black_point = pixels * rm_str_to_pct(argv[0]);
|
4585
|
+
*black_point = pixels * rm_str_to_pct(argv[0], true);
|
4586
4586
|
}
|
4587
4587
|
if (rm_check_num2dbl(argv[1]))
|
4588
4588
|
{
|
@@ -4590,7 +4590,7 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4590
4590
|
}
|
4591
4591
|
else
|
4592
4592
|
{
|
4593
|
-
*white_point = pixels * rm_str_to_pct(argv[1]);
|
4593
|
+
*white_point = pixels * rm_str_to_pct(argv[1], true);
|
4594
4594
|
}
|
4595
4595
|
break;
|
4596
4596
|
|
@@ -4601,7 +4601,7 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4601
4601
|
}
|
4602
4602
|
else
|
4603
4603
|
{
|
4604
|
-
*black_point = pixels * rm_str_to_pct(argv[0]);
|
4604
|
+
*black_point = pixels * rm_str_to_pct(argv[0], true);
|
4605
4605
|
}
|
4606
4606
|
*white_point = pixels - *black_point;
|
4607
4607
|
break;
|
@@ -4622,17 +4622,17 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4622
4622
|
* a linear scaling function to the image pixel values.
|
4623
4623
|
*
|
4624
4624
|
* @overload contrast_stretch_channel(black_point, white_point = pixels - black_point, channel = Magick::AllChannels)
|
4625
|
-
* @param black_point [
|
4625
|
+
* @param black_point [Numeric, String] black out at most this many pixels. Specify an absolute
|
4626
4626
|
* number of pixels as a numeric value, or a percentage as a string in the form 'NN%'.
|
4627
|
-
* @param white_point [
|
4627
|
+
* @param white_point [Numeric, String] burn at most this many pixels. Specify an absolute number
|
4628
4628
|
* of pixels as a numeric value, or a percentage as a string in the form 'NN%'. This argument
|
4629
4629
|
* is optional. If not specified the default is `(columns * rows) - black_point`.
|
4630
4630
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
4631
4631
|
*
|
4632
4632
|
* @overload contrast_stretch_channel(black_point, white_point = pixels - black_point, *channels)
|
4633
|
-
* @param black_point [
|
4633
|
+
* @param black_point [Numeric, String] black out at most this many pixels. Specify an absolute
|
4634
4634
|
* number of pixels as a numeric value, or a percentage as a string in the form 'NN%'.
|
4635
|
-
* @param white_point [
|
4635
|
+
* @param white_point [Numeric, String] burn at most this many pixels. Specify an absolute number of
|
4636
4636
|
* pixels as a numeric value, or a percentage as a string in the form 'NN%'. This argument is
|
4637
4637
|
* optional. If not specified the default is all pixels - black_point pixels.
|
4638
4638
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
@@ -4707,7 +4707,7 @@ Image_morphology(VALUE self, VALUE method_v, VALUE iterations, VALUE kernel_v)
|
|
4707
4707
|
*
|
4708
4708
|
* @param channel_v [Magick::ChannelType] a channel type
|
4709
4709
|
* @param method_v [Magick::MorphologyMethod] the morphology method
|
4710
|
-
* @param
|
4710
|
+
* @param iterations_v [Numeric] apply the operation this many times (or no change).
|
4711
4711
|
* A value of -1 means loop until no change found.
|
4712
4712
|
* How this is applied may depend on the morphology method.
|
4713
4713
|
* Typically this is a value of 1.
|
@@ -4716,19 +4716,19 @@ Image_morphology(VALUE self, VALUE method_v, VALUE iterations, VALUE kernel_v)
|
|
4716
4716
|
*/
|
4717
4717
|
|
4718
4718
|
VALUE
|
4719
|
-
Image_morphology_channel(VALUE self, VALUE channel_v, VALUE method_v, VALUE
|
4719
|
+
Image_morphology_channel(VALUE self, VALUE channel_v, VALUE method_v, VALUE iterations_v, VALUE kernel_v)
|
4720
4720
|
{
|
4721
4721
|
Image *image, *new_image;
|
4722
4722
|
ExceptionInfo *exception;
|
4723
4723
|
MorphologyMethod method;
|
4724
4724
|
ChannelType channel;
|
4725
4725
|
KernelInfo *kernel;
|
4726
|
+
ssize_t iterations = NUM2LONG(iterations_v);;
|
4726
4727
|
|
4727
4728
|
image = rm_check_destroyed(self);
|
4728
4729
|
|
4729
4730
|
VALUE_TO_ENUM(method_v, method, MorphologyMethod);
|
4730
4731
|
VALUE_TO_ENUM(channel_v, channel, ChannelType);
|
4731
|
-
Check_Type(iterations, T_FIXNUM);
|
4732
4732
|
|
4733
4733
|
if (TYPE(kernel_v) == T_STRING)
|
4734
4734
|
{
|
@@ -4746,12 +4746,12 @@ Image_morphology_channel(VALUE self, VALUE channel_v, VALUE method_v, VALUE iter
|
|
4746
4746
|
|
4747
4747
|
#if defined(IMAGEMAGICK_7)
|
4748
4748
|
BEGIN_CHANNEL_MASK(image, channel);
|
4749
|
-
GVL_STRUCT_TYPE(MorphologyImage) args = { image, method,
|
4749
|
+
GVL_STRUCT_TYPE(MorphologyImage) args = { image, method, iterations, kernel, exception };
|
4750
4750
|
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(MorphologyImage), &args);
|
4751
4751
|
CHANGE_RESULT_CHANNEL_MASK(new_image);
|
4752
4752
|
END_CHANNEL_MASK(image);
|
4753
4753
|
#else
|
4754
|
-
GVL_STRUCT_TYPE(MorphologyImageChannel) args = { image, channel, method,
|
4754
|
+
GVL_STRUCT_TYPE(MorphologyImageChannel) args = { image, channel, method, iterations, kernel, exception };
|
4755
4755
|
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(MorphologyImageChannel), &args);
|
4756
4756
|
#endif
|
4757
4757
|
rm_check_exception(exception, new_image, DestroyOnError);
|
@@ -5049,26 +5049,26 @@ Image_crop(int argc, VALUE *argv, VALUE self)
|
|
5049
5049
|
* Extract a region of the image defined by width, height, x, y.
|
5050
5050
|
* In-place form of {Image#crop}.
|
5051
5051
|
*
|
5052
|
-
* @overload crop!(
|
5053
|
-
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5052
|
+
* @overload crop!(x, y, width, height, reset = false)
|
5054
5053
|
* @param x [Numeric] x position of start of region
|
5055
5054
|
* @param y [Numeric] y position of start of region
|
5056
5055
|
* @param width [Numeric] width of region
|
5057
5056
|
* @param height [Numeric] height of region
|
5058
|
-
*
|
5059
|
-
* @overload crop!(reset = false, gravity, width, height)
|
5060
5057
|
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5058
|
+
*
|
5059
|
+
* @overload crop!(gravity, width, height, reset = false)
|
5061
5060
|
* @param gravity [Magick::GravityType] the gravity type
|
5062
5061
|
* @param width [Numeric] width of region
|
5063
5062
|
* @param height [Numeric] height of region
|
5064
|
-
|
5065
|
-
* @overload crop!(reset = false, gravity, x, y, width, height)
|
5066
5063
|
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5064
|
+
|
5065
|
+
* @overload crop!(gravity, x, y, width, height, reset = false)
|
5067
5066
|
* @param gravity [Magick::GravityType] the gravity type
|
5068
5067
|
* @param x [Numeric] x position of start of region
|
5069
5068
|
* @param y [Numeric] y position of start of region
|
5070
5069
|
* @param width [Numeric] width of region
|
5071
5070
|
* @param height [Numeric] height of region
|
5071
|
+
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5072
5072
|
*
|
5073
5073
|
* @return [Magick::Image] a new image
|
5074
5074
|
* @see Image#crop!
|
@@ -5154,8 +5154,8 @@ Image_density(VALUE self)
|
|
5154
5154
|
* resolution. The height attribute is used for the y resolution. If the height attribute is
|
5155
5155
|
* missing, the width attribute is used for both.
|
5156
5156
|
*
|
5157
|
-
* @param density_arg [
|
5158
|
-
* @return [
|
5157
|
+
* @param density_arg [Magick::Geometry, String] The density String or Geometry
|
5158
|
+
* @return [Magick::Geometry, String] the given value
|
5159
5159
|
* @see https://www.imagemagick.org/Magick++/Geometry.html
|
5160
5160
|
*/
|
5161
5161
|
VALUE
|
@@ -5273,8 +5273,8 @@ Image_decipher(VALUE self, VALUE passphrase)
|
|
5273
5273
|
* - If value is nil, the artifact will be removed
|
5274
5274
|
*
|
5275
5275
|
* @param artifact [String] the artifact to set
|
5276
|
-
* @param value [String] the value to which to set the artifact
|
5277
|
-
* @return [String] the given `value`
|
5276
|
+
* @param value [String, nil] the value to which to set the artifact
|
5277
|
+
* @return [String, nil] the given `value`
|
5278
5278
|
*/
|
5279
5279
|
VALUE
|
5280
5280
|
Image_define(VALUE self, VALUE artifact, VALUE value)
|
@@ -5311,7 +5311,7 @@ Image_define(VALUE self, VALUE artifact, VALUE value)
|
|
5311
5311
|
* sequence. The default number of ticks is 0. By default there are 100 ticks per second but this
|
5312
5312
|
* number can be changed via the ticks_per_second attribute.
|
5313
5313
|
*
|
5314
|
-
* @return [
|
5314
|
+
* @return [Integer] The current delay value.
|
5315
5315
|
*/
|
5316
5316
|
VALUE
|
5317
5317
|
Image_delay(VALUE self)
|
@@ -5399,7 +5399,7 @@ Image_delete_profile(VALUE self, VALUE name)
|
|
5399
5399
|
* - If all pixels have lower-order bytes equal to higher-order bytes, the depth will be reported as
|
5400
5400
|
* 8 even if the depth field in the Image structure says 16.
|
5401
5401
|
*
|
5402
|
-
* @return [
|
5402
|
+
* @return [Integer] the depth
|
5403
5403
|
*/
|
5404
5404
|
VALUE
|
5405
5405
|
Image_depth(VALUE self)
|
@@ -5425,9 +5425,9 @@ Image_depth(VALUE self)
|
|
5425
5425
|
* Straightens an image. A threshold of 40% works for most images.
|
5426
5426
|
*
|
5427
5427
|
* @overload deskew(threshold = 0.40, auto_crop_width = nil)
|
5428
|
-
* @param threshold [
|
5428
|
+
* @param threshold [Numeric, String] A percentage of QuantumRange. Either a Float between 0 and 1.0,
|
5429
5429
|
* inclusive, or a string in the form "NN%" where NN is between 0 and 100.
|
5430
|
-
* @param auto_crop_width [
|
5430
|
+
* @param auto_crop_width [Numeric] Specify a value for this argument to cause the deskewed image to
|
5431
5431
|
* be auto-cropped. The argument is the pixel width of the image background (e.g. 40).
|
5432
5432
|
* @return [Magick::Image] a new image
|
5433
5433
|
*/
|
@@ -5454,7 +5454,7 @@ Image_deskew(int argc, VALUE *argv, VALUE self)
|
|
5454
5454
|
case 0:
|
5455
5455
|
break;
|
5456
5456
|
default:
|
5457
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
5457
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 2)", argc);
|
5458
5458
|
break;
|
5459
5459
|
}
|
5460
5460
|
|
@@ -5583,7 +5583,7 @@ Image_difference(VALUE self, VALUE other)
|
|
5583
5583
|
/**
|
5584
5584
|
* Get image directory.
|
5585
5585
|
*
|
5586
|
-
* @return [String] the directory
|
5586
|
+
* @return [String, nil] the directory
|
5587
5587
|
*/
|
5588
5588
|
VALUE
|
5589
5589
|
Image_directory(VALUE self)
|
@@ -5599,8 +5599,8 @@ Image_directory(VALUE self)
|
|
5599
5599
|
* @overload displace(displacement_map, x_amp, y_amp = x_amp, gravity = Magick::NorthWestGravity, x_offset = 0, y_offset = 0)
|
5600
5600
|
* @param displacement_map [Magick::Image, Magick::ImageList] The source image for the composite
|
5601
5601
|
* operation. Either an imagelist or an image. If an imagelist, uses the current image.
|
5602
|
-
* @param x_amp [
|
5603
|
-
* @param y_amp [
|
5602
|
+
* @param x_amp [Numeric] The maximum displacement on the x-axis.
|
5603
|
+
* @param y_amp [Numeric] The maximum displacement on the y-axis.
|
5604
5604
|
* @param gravity [Magick::GravityType] the gravity for offset. the offsets are measured from the
|
5605
5605
|
* NorthWest corner by default.
|
5606
5606
|
* @param x_offset [Numeric] The offset that measured from the left-hand side of the target image.
|
@@ -5757,6 +5757,8 @@ Image_dispatch(int argc, VALUE *argv, VALUE self)
|
|
5757
5757
|
/**
|
5758
5758
|
* Display the image to an X window screen.
|
5759
5759
|
*
|
5760
|
+
* @yield [info]
|
5761
|
+
* @yieldparam info [Magick::Image::Info]
|
5760
5762
|
* @return [Magick::Image] self
|
5761
5763
|
*/
|
5762
5764
|
VALUE
|
@@ -5833,10 +5835,10 @@ Image_dispose_eq(VALUE self, VALUE dispose)
|
|
5833
5835
|
* @overload dissolve(overlay, src_percent, dst_percent = -1.0, gravity = Magick::NorthWestGravity, x_offset = 0, y_offset = 0)
|
5834
5836
|
* @param overlay [Magick::Image, Magick::ImageList] The source image for the composite operation.
|
5835
5837
|
* Either an imagelist or an image. If an imagelist, uses the current image.
|
5836
|
-
* @param src_percent [
|
5838
|
+
* @param src_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
5837
5839
|
* If src_percentage is a number it is interpreted as a percentage.
|
5838
5840
|
* Both 0.25 and "25%" mean 25%. This argument is required.
|
5839
|
-
* @param dst_percent [
|
5841
|
+
* @param dst_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
5840
5842
|
* If src_percentage is a number it is interpreted as a percentage.
|
5841
5843
|
* Both 0.25 and "25%" mean 25%. This argument may omitted if no other arguments follow it.
|
5842
5844
|
* In this case the default is 100%-src_percentage.
|
@@ -5925,7 +5927,8 @@ Image_dissolve(int argc, VALUE *argv, VALUE self)
|
|
5925
5927
|
* image is adjusted to ensure the whole source image will just fit within the final destination
|
5926
5928
|
* image, which will be sized and offset accordingly. Also in many cases the virtual offset of
|
5927
5929
|
* the source image will be taken into account in the mapping.
|
5928
|
-
* @yield [
|
5930
|
+
* @yield [opt_args]
|
5931
|
+
* @yieldparam opt_args [Magick::OptionalMethodArguments]
|
5929
5932
|
*
|
5930
5933
|
* @return [Magick::Image] a new image
|
5931
5934
|
* @example
|
@@ -6191,7 +6194,7 @@ Image_each_profile(VALUE self)
|
|
6191
6194
|
* Find edges in an image. "radius" defines the radius of the convolution filter.
|
6192
6195
|
*
|
6193
6196
|
* @overload edge(radius = 0.0)
|
6194
|
-
* @param radius [
|
6197
|
+
* @param radius [Numeric] The radius of the convolution filter.
|
6195
6198
|
* @return [Magick::Image] a new image
|
6196
6199
|
*/
|
6197
6200
|
VALUE
|
@@ -6279,8 +6282,8 @@ effect_image(VALUE self, int argc, VALUE *argv, gvl_function_t fp)
|
|
6279
6282
|
* Adds a 3-dimensional effect.
|
6280
6283
|
*
|
6281
6284
|
* @overload emboss(radius = 0.0, sigma = 1.0)
|
6282
|
-
* @param radius [
|
6283
|
-
* @param sigma [
|
6285
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
6286
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
6284
6287
|
* @return [Magick::Image] a new image
|
6285
6288
|
*/
|
6286
6289
|
VALUE
|
@@ -6810,7 +6813,7 @@ Image_export_pixels_to_str(int argc, VALUE *argv, VALUE self)
|
|
6810
6813
|
case 0:
|
6811
6814
|
break;
|
6812
6815
|
default:
|
6813
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
6816
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 6)", argc);
|
6814
6817
|
break;
|
6815
6818
|
}
|
6816
6819
|
|
@@ -6920,7 +6923,7 @@ Image_filename(VALUE self)
|
|
6920
6923
|
/**
|
6921
6924
|
* Return the image file size.
|
6922
6925
|
*
|
6923
|
-
* @return [
|
6926
|
+
* @return [Integer] the file size
|
6924
6927
|
*/
|
6925
6928
|
VALUE Image_filesize(VALUE self)
|
6926
6929
|
{
|
@@ -7090,7 +7093,7 @@ Image_flip(VALUE self)
|
|
7090
7093
|
* Create a vertical mirror image by reflecting the pixels around the central x-axis.
|
7091
7094
|
* In-place form of {Image#flip}.
|
7092
7095
|
*
|
7093
|
-
* @return [Magick::Image]
|
7096
|
+
* @return [Magick::Image] self
|
7094
7097
|
* @see Image#flip
|
7095
7098
|
* @see Image#flop
|
7096
7099
|
* @see Image#flop!
|
@@ -7123,7 +7126,7 @@ Image_flop(VALUE self)
|
|
7123
7126
|
* Create a horizonal mirror image by reflecting the pixels around the central y-axis.
|
7124
7127
|
* In-place form of {Image#flop}.
|
7125
7128
|
*
|
7126
|
-
* @return [Magick::Image]
|
7129
|
+
* @return [Magick::Image] self
|
7127
7130
|
* @see Image#flop
|
7128
7131
|
* @see Image#flip
|
7129
7132
|
* @see Image#flip!
|
@@ -7273,7 +7276,8 @@ Image_frame(int argc, VALUE *argv, VALUE self)
|
|
7273
7276
|
* @overload from_blob(blob)
|
7274
7277
|
* This yields {Magick::Image::Info} to block with its object's scope.
|
7275
7278
|
* @param blob [String] the blob data
|
7276
|
-
* @yield [
|
7279
|
+
* @yield [info]
|
7280
|
+
* @yieldparam info [Magick::Image::Info]
|
7277
7281
|
*
|
7278
7282
|
* @return [Array<Magick::Image>] an array of new images
|
7279
7283
|
* @see Image#to_blob
|
@@ -7315,15 +7319,14 @@ Image_from_blob(VALUE klass ATTRIBUTE_UNUSED, VALUE blob_arg)
|
|
7315
7319
|
*
|
7316
7320
|
* @overload function_channel(function, *args, channel = Magick::AllChannels)
|
7317
7321
|
* @param function [Magick::MagickFunction] the function
|
7318
|
-
* @param *args [
|
7322
|
+
* @param *args [Numeric] One or more floating-point numbers.
|
7319
7323
|
* The number of parameters depends on the function. See the ImageMagick documentation for
|
7320
7324
|
* details.
|
7321
|
-
|
7322
7325
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
7323
7326
|
*
|
7324
7327
|
* @overload function_channel(function, *args, *channels)
|
7325
7328
|
* @param function [Magick::MagickFunction] the function
|
7326
|
-
* @param *args [
|
7329
|
+
* @param *args [Numeric] One or more floating-point numbers.
|
7327
7330
|
* The number of parameters depends on the function. See the ImageMagick documentation for
|
7328
7331
|
* details.
|
7329
7332
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
@@ -7429,9 +7432,9 @@ Image_fuzz(VALUE self)
|
|
7429
7432
|
/**
|
7430
7433
|
* Set the number of algorithms search for a target color.
|
7431
7434
|
*
|
7432
|
-
* @param fuzz [String,
|
7435
|
+
* @param fuzz [String, Numeric] The argument may be a floating-point numeric value or a string in the
|
7433
7436
|
* form "NN%".
|
7434
|
-
* @return [String,
|
7437
|
+
* @return [String, Numeric] the given value
|
7435
7438
|
* @see Info#fuzz=
|
7436
7439
|
*/
|
7437
7440
|
VALUE
|
@@ -7510,8 +7513,8 @@ Image_gamma(VALUE self)
|
|
7510
7513
|
/**
|
7511
7514
|
* Set the gamma level of the image.
|
7512
7515
|
*
|
7513
|
-
* @param val [
|
7514
|
-
* @return [
|
7516
|
+
* @param val [Numeric] the gamma level
|
7517
|
+
* @return [Numeric] the gamma level
|
7515
7518
|
*/
|
7516
7519
|
VALUE
|
7517
7520
|
Image_gamma_eq(VALUE self, VALUE val)
|
@@ -7524,12 +7527,12 @@ Image_gamma_eq(VALUE self, VALUE val)
|
|
7524
7527
|
* Apply gamma to a channel.
|
7525
7528
|
*
|
7526
7529
|
* @overload gamma_channel(gamma, channel = Magick::AllChannels)
|
7527
|
-
* @param Values gamma [
|
7530
|
+
* @param Values gamma [Numeric] typically range from 0.8 to 2.3. You can also reduce the influence
|
7528
7531
|
* of a particular channel with a gamma value of 0.
|
7529
7532
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
7530
7533
|
*
|
7531
7534
|
* @overload gamma_channel(gamma, *channels)
|
7532
|
-
* @param Values gamma [
|
7535
|
+
* @param Values gamma [Numeric] typically range from 0.8 to 2.3. You can also reduce the influence
|
7533
7536
|
* of a particular channel with a gamma value of 0.
|
7534
7537
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
7535
7538
|
*
|
@@ -7679,8 +7682,8 @@ Image_gamma_correct(int argc, VALUE *argv, VALUE self)
|
|
7679
7682
|
* Blur the image.
|
7680
7683
|
*
|
7681
7684
|
* @overload gaussian_blur(radius = 0.0, sigma = 1.0)
|
7682
|
-
* @param radius [
|
7683
|
-
* @param sigma [
|
7685
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
7686
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
7684
7687
|
* @return [Magick::Image] a new image
|
7685
7688
|
*/
|
7686
7689
|
VALUE
|
@@ -7694,13 +7697,13 @@ Image_gaussian_blur(int argc, VALUE *argv, VALUE self)
|
|
7694
7697
|
* Blur the image on a channel.
|
7695
7698
|
*
|
7696
7699
|
* @overload gaussian_blur_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
7697
|
-
* @param radius [
|
7698
|
-
* @param sigma [
|
7700
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
7701
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
7699
7702
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
7700
7703
|
*
|
7701
7704
|
* @overload gaussian_blur_channel(radius = 0.0, sigma = 1.0, *channels)
|
7702
|
-
* @param radius [
|
7703
|
-
* @param sigma [
|
7705
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
7706
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
7704
7707
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
7705
7708
|
*
|
7706
7709
|
* @return [Magick::Image] a new image
|
@@ -7767,8 +7770,8 @@ Image_geometry(VALUE self)
|
|
7767
7770
|
/**
|
7768
7771
|
* Set the preferred size of the image when encoding.
|
7769
7772
|
*
|
7770
|
-
* @param geometry [String] the geometry
|
7771
|
-
* @return [String] the given geometry
|
7773
|
+
* @param geometry [Magick::Geometry, String] the geometry
|
7774
|
+
* @return [Magick::Geometry, String] the given geometry
|
7772
7775
|
* @see https://www.imagemagick.org/Magick++/Geometry.html
|
7773
7776
|
*/
|
7774
7777
|
VALUE
|
@@ -8000,6 +8003,8 @@ Image_histogram_q(VALUE self)
|
|
8000
8003
|
* Implode the image by the specified percentage.
|
8001
8004
|
*
|
8002
8005
|
* @overload implode(amount = 0.50)
|
8006
|
+
* @param amount [Numeric] Increasing the absolute value of the argument increases the effect.
|
8007
|
+
* The value may be positive for implosion, or negative for explosion. The default is 0.50.
|
8003
8008
|
* @return [Magick::Image] a new image
|
8004
8009
|
*/
|
8005
8010
|
VALUE
|
@@ -8466,8 +8471,8 @@ Image_iptc_profile(VALUE self)
|
|
8466
8471
|
/**
|
8467
8472
|
* Set the IPTC profile. The argument is a string.
|
8468
8473
|
*
|
8469
|
-
* @param profile [String] the IPTC profile
|
8470
|
-
* @return [String] the given profile
|
8474
|
+
* @param profile [String, nil] the IPTC profile
|
8475
|
+
* @return [String, nil] the given profile
|
8471
8476
|
*/
|
8472
8477
|
VALUE
|
8473
8478
|
Image_iptc_profile_eq(VALUE self, VALUE profile)
|
@@ -8502,9 +8507,9 @@ Image_iterations_eq(VALUE self, VALUE val)
|
|
8502
8507
|
* points to the full available quantum range.
|
8503
8508
|
*
|
8504
8509
|
* @overload level2(black_point = 0.0, white_point = Magick::QuantumRange, gamma = 1.0)
|
8505
|
-
* @param black_point [
|
8506
|
-
* @param white_point [
|
8507
|
-
* @param gamma [
|
8510
|
+
* @param black_point [Numeric] A black point level in the range 0 - QuantumRange.
|
8511
|
+
* @param white_point [Numeric] A white point level in the range 0..QuantumRange.
|
8512
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8508
8513
|
* @return [Magick::Image] a new image
|
8509
8514
|
*/
|
8510
8515
|
VALUE
|
@@ -8565,9 +8570,9 @@ Image_level2(int argc, VALUE *argv, VALUE self)
|
|
8565
8570
|
*
|
8566
8571
|
* @overload level_channel(aChannelType, black = 0.0, white = 1.0, gamma = Magick::QuantumRange)
|
8567
8572
|
* @param aChannelType [Magick::ChannelType] A ChannelType value.
|
8568
|
-
* @param black [
|
8569
|
-
* @param white [
|
8570
|
-
* @param gamma [
|
8573
|
+
* @param black [Numeric] A black point level in the range 0..QuantumRange.
|
8574
|
+
* @param white [Numeric] A white point level in the range 0..QuantumRange.
|
8575
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8571
8576
|
* @return [Magick::Image] a new image
|
8572
8577
|
* @see Image#level2
|
8573
8578
|
*/
|
@@ -8720,14 +8725,15 @@ Image_level_colors(int argc, VALUE *argv, VALUE self)
|
|
8720
8725
|
* Maps black and white to the specified points. The reverse of {Image#level_channel}.
|
8721
8726
|
*
|
8722
8727
|
* @overload levelize_channel(black_point, white_point = Magick::QuantumRange - black_point, gamma = 1.0, channel = Magick::AllChannels)
|
8723
|
-
* @param black [
|
8724
|
-
* @param white [
|
8725
|
-
* @param gamma [
|
8728
|
+
* @param black [Numeric] A black point level in the range 0..QuantumRange.
|
8729
|
+
* @param white [Numeric] A white point level in the range 0..QuantumRange.
|
8730
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8731
|
+
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
8726
8732
|
*
|
8727
8733
|
* @overload levelize_channel(black_point, white_point = Magick::QuantumRange - black_point, gamma = 1.0, *channels)
|
8728
|
-
* @param black [
|
8729
|
-
* @param white [
|
8730
|
-
* @param gamma [
|
8734
|
+
* @param black [Numeric] A black point level in the range 0..QuantumRange.
|
8735
|
+
* @param white [Numeric] A white point level in the range 0..QuantumRange.
|
8736
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8731
8737
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
8732
8738
|
*
|
8733
8739
|
* @return [Magick::Image] a new image
|
@@ -8798,10 +8804,10 @@ Image_levelize_channel(int argc, VALUE *argv, VALUE self)
|
|
8798
8804
|
* Linear with saturation stretch.
|
8799
8805
|
*
|
8800
8806
|
* @overload linear_stretch(black_point, white_point = pixels - black_point)
|
8801
|
-
* @param black_point [
|
8807
|
+
* @param black_point [Numeric, String] black out at most this many pixels.
|
8802
8808
|
* Specify an absolute number of pixels as a numeric value, or a percentage as a string in the
|
8803
8809
|
* form 'NN%'.
|
8804
|
-
* @param white_point [
|
8810
|
+
* @param white_point [Numeric, String] burn at most this many pixels.
|
8805
8811
|
* Specify an absolute number of pixels as a numeric value, or a percentage as a string in the
|
8806
8812
|
* form 'NN%'.
|
8807
8813
|
* This argument is optional. If not specified the default is `(columns * rows) - black_point`.
|
@@ -8844,8 +8850,8 @@ Image_linear_stretch(int argc, VALUE *argv, VALUE self)
|
|
8844
8850
|
* @param columns [Numeric] The desired width height. Should not exceed 200% of the original
|
8845
8851
|
* dimension.
|
8846
8852
|
* @param rows [Numeric] The desired height. Should not exceed 200% of the original dimension.
|
8847
|
-
* @param delta_x [
|
8848
|
-
* @param rigidity [
|
8853
|
+
* @param delta_x [Numeric] Maximum seam transversal step (0 means straight seams).
|
8854
|
+
* @param rigidity [Numeric] Introduce a bias for non-straight seams (typically 0).
|
8849
8855
|
* @return [Magick::Image] a new image
|
8850
8856
|
*/
|
8851
8857
|
VALUE
|
@@ -9304,7 +9310,7 @@ set_image_mask(Image *image, VALUE mask)
|
|
9304
9310
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
9305
9311
|
* imagelist, uses the current image.
|
9306
9312
|
*
|
9307
|
-
* @return [Magick::Image] the mask image
|
9313
|
+
* @return [Magick::Image, nil] the mask image
|
9308
9314
|
*/
|
9309
9315
|
VALUE
|
9310
9316
|
Image_mask(int argc, VALUE *argv, VALUE self)
|
@@ -9576,9 +9582,12 @@ Image_minify_bang(VALUE self)
|
|
9576
9582
|
* Changes the brightness, saturation, and hue.
|
9577
9583
|
*
|
9578
9584
|
* @overload modulate(brightness = 1.0, saturation = 1.0, hue = 1.0)
|
9579
|
-
* @param brightness [
|
9580
|
-
*
|
9581
|
-
* @param
|
9585
|
+
* @param brightness [Numeric, String] The percent change in the brightness.
|
9586
|
+
* Must be a non-negative number or a string in the form "NN%".
|
9587
|
+
* @param saturation [Numeric, String] The percent change in the saturation.
|
9588
|
+
* Must be a number or a string in the form "NN%".
|
9589
|
+
* @param hue [Numeric, String] The percent change in the hue.
|
9590
|
+
* Must be a number or a string in the form "NN%".
|
9582
9591
|
* @return [Magick::Image] a new image
|
9583
9592
|
*/
|
9584
9593
|
VALUE
|
@@ -9597,11 +9606,11 @@ Image_modulate(int argc, VALUE *argv, VALUE self)
|
|
9597
9606
|
switch (argc)
|
9598
9607
|
{
|
9599
9608
|
case 3:
|
9600
|
-
pct_hue =
|
9609
|
+
pct_hue = rm_percentage2(argv[2], 1.0, false) * 100.0;
|
9601
9610
|
case 2:
|
9602
|
-
pct_saturation =
|
9611
|
+
pct_saturation = rm_percentage2(argv[1], 1.0, false) * 100.0;
|
9603
9612
|
case 1:
|
9604
|
-
pct_brightness =
|
9613
|
+
pct_brightness = rm_percentage(argv[0], 1.0) * 100.0;
|
9605
9614
|
break;
|
9606
9615
|
case 0:
|
9607
9616
|
break;
|
@@ -9654,7 +9663,7 @@ Image_monochrome_q(VALUE self)
|
|
9654
9663
|
/**
|
9655
9664
|
* Tile size and offset within an image montage. Only valid for montage images.
|
9656
9665
|
*
|
9657
|
-
* @return [String] the tile size and offset
|
9666
|
+
* @return [String, nil] the tile size and offset
|
9658
9667
|
*/
|
9659
9668
|
VALUE
|
9660
9669
|
Image_montage(VALUE self)
|
@@ -9699,7 +9708,7 @@ motion_blur(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
9699
9708
|
case 0:
|
9700
9709
|
break;
|
9701
9710
|
default:
|
9702
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
9711
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 3)", argc);
|
9703
9712
|
break;
|
9704
9713
|
}
|
9705
9714
|
|
@@ -9727,9 +9736,9 @@ motion_blur(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
9727
9736
|
* blurring motion.
|
9728
9737
|
*
|
9729
9738
|
* @overload motion_blur(radius = 0.0, sigma = 1.0, angle = 0.0)
|
9730
|
-
* @param radius [
|
9731
|
-
* @param sigma [
|
9732
|
-
* @param angle [
|
9739
|
+
* @param radius [Numeric] The radius
|
9740
|
+
* @param sigma [Numeric] The standard deviation
|
9741
|
+
* @param angle [Numeric] The angle (in degrees)
|
9733
9742
|
* @return [Magick::Image] a new image
|
9734
9743
|
*/
|
9735
9744
|
VALUE
|
@@ -9797,7 +9806,6 @@ Image_negate(int argc, VALUE *argv, VALUE self)
|
|
9797
9806
|
* @overload negate_channel(grayscale = false, *channels)
|
9798
9807
|
* @param grayscale [Boolean] If the grayscale argument is true, only the grayscale values are
|
9799
9808
|
* negated.
|
9800
|
-
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
9801
9809
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
9802
9810
|
*
|
9803
9811
|
* @return [Magick::Image] a new image
|
@@ -10012,7 +10020,11 @@ Image_normalize(VALUE self)
|
|
10012
10020
|
*
|
10013
10021
|
* @overload normalize_channel(channel = Magick::AllChannels)
|
10014
10022
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
10015
|
-
*
|
10023
|
+
*
|
10024
|
+
* @overload normalize_channel(*channels)
|
10025
|
+
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
10026
|
+
*
|
10027
|
+
* @return [Magick::Image] a new image
|
10016
10028
|
*/
|
10017
10029
|
VALUE
|
10018
10030
|
Image_normalize_channel(int argc, VALUE *argv, VALUE self)
|
@@ -10077,7 +10089,7 @@ Image_normalized_maximum_error(VALUE self)
|
|
10077
10089
|
/**
|
10078
10090
|
* Return the number of unique colors in the image.
|
10079
10091
|
*
|
10080
|
-
* @return [
|
10092
|
+
* @return [Integer] number of unique colors
|
10081
10093
|
*/
|
10082
10094
|
VALUE
|
10083
10095
|
Image_number_colors(VALUE self)
|
@@ -10102,7 +10114,7 @@ Image_number_colors(VALUE self)
|
|
10102
10114
|
/**
|
10103
10115
|
* Get the number of bytes to skip over when reading raw image.
|
10104
10116
|
*
|
10105
|
-
* @return [
|
10117
|
+
* @return [Integer] the offset
|
10106
10118
|
*/
|
10107
10119
|
VALUE
|
10108
10120
|
Image_offset(VALUE self)
|
@@ -10113,8 +10125,8 @@ Image_offset(VALUE self)
|
|
10113
10125
|
/**
|
10114
10126
|
* Set the number of bytes to skip over when reading raw image.
|
10115
10127
|
*
|
10116
|
-
* @param val [
|
10117
|
-
* @return [
|
10128
|
+
* @param val [Numeric] the offset
|
10129
|
+
* @return [Numeric] the given offset
|
10118
10130
|
*/
|
10119
10131
|
VALUE
|
10120
10132
|
Image_offset_eq(VALUE self, VALUE val)
|
@@ -10127,7 +10139,7 @@ Image_offset_eq(VALUE self, VALUE val)
|
|
10127
10139
|
* Apply a special effect filter that simulates an oil painting.
|
10128
10140
|
*
|
10129
10141
|
* @overload oil_paint(radius = 3.0)
|
10130
|
-
* @param radius [
|
10142
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels.
|
10131
10143
|
* @return [Magick::Image] a new image
|
10132
10144
|
*/
|
10133
10145
|
VALUE
|
@@ -10232,7 +10244,7 @@ Image_opaque(VALUE self, VALUE target, VALUE fill)
|
|
10232
10244
|
* @param fill [Magick::Pixel, String] the color for filling
|
10233
10245
|
* @param invert [Boolean] If true, the target pixels are all the pixels that are not the target
|
10234
10246
|
* color. The default is the value of the target image's fuzz attribute
|
10235
|
-
* @param fuzz [
|
10247
|
+
* @param fuzz [Numeric] Colors within this distance are considered equal to the target color.
|
10236
10248
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
10237
10249
|
*
|
10238
10250
|
* @overload opaque_channel(target, fill, invert, fuzz, *channels)
|
@@ -10240,7 +10252,7 @@ Image_opaque(VALUE self, VALUE target, VALUE fill)
|
|
10240
10252
|
* @param fill [Magick::Pixel, String] the color for filling
|
10241
10253
|
* @param invert [Boolean] If true, the target pixels are all the pixels that are not the target
|
10242
10254
|
* color. The default is the value of the target image's fuzz attribute
|
10243
|
-
* @param fuzz [
|
10255
|
+
* @param fuzz [Numeric] Colors within this distance are considered equal to the target color.
|
10244
10256
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
10245
10257
|
*
|
10246
10258
|
* @return [Magick::Image] a new image
|
@@ -10464,11 +10476,11 @@ Image_page_eq(VALUE self, VALUE rect)
|
|
10464
10476
|
* Changes the opacity value of all the pixels that match color to the value specified by opacity.
|
10465
10477
|
* If invert is true, changes the pixels that don't match color.
|
10466
10478
|
*
|
10467
|
-
* @overload paint_transparent(
|
10468
|
-
* @param
|
10479
|
+
* @overload paint_transparent(color, invert, fuzz, alpha: Magick::TransparentAlpha)
|
10480
|
+
* @param color [Magick::Pixel, String] the color name
|
10469
10481
|
* @param invert [Boolean] If true, the target pixels are all the pixels that are not the target
|
10470
10482
|
* color.
|
10471
|
-
* @param fuzz [
|
10483
|
+
* @param fuzz [Numeric] By default the pixel must match exactly, but you can specify a tolerance
|
10472
10484
|
* level by passing a positive value.
|
10473
10485
|
* @param alpha [Numeric] The new alpha value, either an alpha value or a number between 0 and
|
10474
10486
|
* QuantumRange. The default is TransparentAlpha.
|
@@ -10576,6 +10588,9 @@ Image_palette_q(VALUE self)
|
|
10576
10588
|
/**
|
10577
10589
|
* Returns all the properties of an image or image sequence except for the pixels.
|
10578
10590
|
*
|
10591
|
+
* @param file_arg [File, String] the file containing image data or file name
|
10592
|
+
* @yield [info]
|
10593
|
+
* @yieldparam info [Magick::Image::Info]
|
10579
10594
|
* @return [Array<Magick::Image>] an array of 1 or more new image objects (without pixel data)
|
10580
10595
|
* @see Image#read
|
10581
10596
|
*/
|
@@ -10814,7 +10829,7 @@ Image_pixel_interpolation_method_eq(VALUE self, VALUE method)
|
|
10814
10829
|
* font_weight, gravity, pointsize, stroke, stroke_width, text_antialias, undercolor.
|
10815
10830
|
*
|
10816
10831
|
* @overload polaroid(angle = -5.0)
|
10817
|
-
* @param angle [
|
10832
|
+
* @param angle [Numeric] The resulting image is rotated by this amount, measured in degrees.
|
10818
10833
|
*
|
10819
10834
|
* @overload polaroid(angle = -5.0)
|
10820
10835
|
* If present a block, optional arguments may be specified in a block associated with the method.
|
@@ -10823,8 +10838,9 @@ Image_pixel_interpolation_method_eq(VALUE self, VALUE method)
|
|
10823
10838
|
* use options.shadow_color.
|
10824
10839
|
* To specify a different border color (that is, the color of the image border) use options.border_color.
|
10825
10840
|
* Both of these methods accept either a color name or a Pixel argument.
|
10826
|
-
* @param angle [
|
10827
|
-
* @yield [
|
10841
|
+
* @param angle [Numeric] The resulting image is rotated by this amount, measured in degrees.
|
10842
|
+
* @yield [opt]
|
10843
|
+
* @yieldparam opt [Magick::Image::PolaroidOptions]
|
10828
10844
|
*
|
10829
10845
|
* @return [Magick::Image] a new image
|
10830
10846
|
*/
|
@@ -10965,7 +10981,7 @@ Image_preview(VALUE self, VALUE preview)
|
|
10965
10981
|
* Set the image profile. If "profile" is nil, deletes the profile. Otherwise "profile" must be a
|
10966
10982
|
* string containing the specified profile.
|
10967
10983
|
*
|
10968
|
-
* @param name [String] The profile name, or "*" to represent all the profiles in the image.
|
10984
|
+
* @param name [String, nil] The profile name, or "*" to represent all the profiles in the image.
|
10969
10985
|
* @param profile [String] The profile value, or nil to cause the profile to be removed.
|
10970
10986
|
* @return [Magick::Image] self
|
10971
10987
|
*/
|
@@ -10988,7 +11004,7 @@ Image_profile_bang(VALUE self, VALUE name, VALUE profile)
|
|
10988
11004
|
/**
|
10989
11005
|
* Get image quality.
|
10990
11006
|
*
|
10991
|
-
* @return [
|
11007
|
+
* @return [Integer] the quality
|
10992
11008
|
*/
|
10993
11009
|
VALUE
|
10994
11010
|
Image_quality(VALUE self)
|
@@ -11000,7 +11016,7 @@ Image_quality(VALUE self)
|
|
11000
11016
|
/**
|
11001
11017
|
* Return the image depth to the nearest Quantum (8, 16, or 32).
|
11002
11018
|
*
|
11003
|
-
* @return [
|
11019
|
+
* @return [Integer] image depth
|
11004
11020
|
*/
|
11005
11021
|
VALUE
|
11006
11022
|
Image_quantum_depth(VALUE self)
|
@@ -11025,12 +11041,12 @@ Image_quantum_depth(VALUE self)
|
|
11025
11041
|
*
|
11026
11042
|
* @overload quantum_operator(quantum_expression_op, rvalue, channel = Magick::AllChannels)
|
11027
11043
|
* @param quantum_expression_op [Magick::QuantumExpressionOperator] the operator
|
11028
|
-
* @param rvalue [
|
11044
|
+
* @param rvalue [Numeric] the operation rvalue.
|
11029
11045
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
11030
11046
|
*
|
11031
11047
|
* @overload quantum_operator(quantum_expression_op, rvalue, *channels)
|
11032
11048
|
* @param quantum_expression_op [Magick::QuantumExpressionOperator] the operator
|
11033
|
-
* @param rvalue [
|
11049
|
+
* @param rvalue [Numeric] the operation rvalue.
|
11034
11050
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
11035
11051
|
*
|
11036
11052
|
* @return [Magick::Image] self
|
@@ -11278,7 +11294,7 @@ Image_quantize(int argc, VALUE *argv, VALUE self)
|
|
11278
11294
|
/**
|
11279
11295
|
* Applies a radial blur to the image.
|
11280
11296
|
*
|
11281
|
-
* @param angle_obj [
|
11297
|
+
* @param angle_obj [Numeric] the angle (in degrees)
|
11282
11298
|
* @return [Magick::Image] a new image
|
11283
11299
|
*/
|
11284
11300
|
VALUE
|
@@ -11311,11 +11327,11 @@ Image_radial_blur(VALUE self, VALUE angle_obj)
|
|
11311
11327
|
* Applies a radial blur to the selected image channels.
|
11312
11328
|
*
|
11313
11329
|
* @overload radial_blur_channel(angle, channel = Magick::AllChannels)
|
11314
|
-
* @param angle [
|
11330
|
+
* @param angle [Numeric] the angle (in degrees)
|
11315
11331
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
11316
11332
|
*
|
11317
11333
|
* @overload radial_blur_channel(angle, *channels)
|
11318
|
-
* @param angle [
|
11334
|
+
* @param angle [Numeric] the angle (in degrees)
|
11319
11335
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
11320
11336
|
*
|
11321
11337
|
* @return [Magick::Image] a new image
|
@@ -11369,11 +11385,11 @@ Image_radial_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
11369
11385
|
* threshold. The result is a low-contrast, two color image.
|
11370
11386
|
*
|
11371
11387
|
* @overload random_threshold_channel(geometry_str, channel = Magick::AllChannels)
|
11372
|
-
* @param geometry_str [String] A geometry string containing LOWxHIGH thresholds.
|
11388
|
+
* @param geometry_str [Magick::Geometry, String] A geometry string containing LOWxHIGH thresholds.
|
11373
11389
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
11374
11390
|
*
|
11375
11391
|
* @overload random_threshold_channel(geometry_str, *channels)
|
11376
|
-
* @param geometry_str [String] A geometry string containing LOWxHIGH thresholds.
|
11392
|
+
* @param geometry_str [Magick::Geometry, String] A geometry string containing LOWxHIGH thresholds.
|
11377
11393
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
11378
11394
|
*
|
11379
11395
|
* @return [Magick::Image] a new image
|
@@ -11497,6 +11513,8 @@ Image_raise(int argc, VALUE *argv, VALUE self)
|
|
11497
11513
|
* Call ReadImage.
|
11498
11514
|
*
|
11499
11515
|
* @param file_arg [File, String] the file containing image data or file name
|
11516
|
+
* @yield [info]
|
11517
|
+
* @yieldparam info [Magick::Image::Info]
|
11500
11518
|
* @return [Array<Magick::Image>] an array of 1 or more new image objects
|
11501
11519
|
*/
|
11502
11520
|
VALUE
|
@@ -11626,7 +11644,7 @@ rd_image(VALUE klass ATTRIBUTE_UNUSED, VALUE file, gvl_function_t fp)
|
|
11626
11644
|
* sized matrices, typically you use a 5x5 for an RGBA image and a 6x6 for CMYKA. Populate the last
|
11627
11645
|
* row with normalized values to translate.
|
11628
11646
|
*
|
11629
|
-
* @param color_matrix [Array<
|
11647
|
+
* @param color_matrix [Array<Numeric>] An array of Float values representing the recolor matrix.
|
11630
11648
|
* @return [Magick::Image] a new image
|
11631
11649
|
*/
|
11632
11650
|
VALUE
|
@@ -11704,6 +11722,8 @@ Image_recolor(VALUE self, VALUE color_matrix)
|
|
11704
11722
|
* Read a Base64-encoded image.
|
11705
11723
|
*
|
11706
11724
|
* @param content [String] the content
|
11725
|
+
* @yield [info]
|
11726
|
+
* @yieldparam info [Magick::Image::Info]
|
11707
11727
|
* @return [Array<Magick::Image>] an array of new images
|
11708
11728
|
*/
|
11709
11729
|
VALUE
|
@@ -12058,10 +12078,10 @@ resample(int bang, int argc, VALUE *argv, VALUE self)
|
|
12058
12078
|
* specifying the resample resolution.
|
12059
12079
|
*
|
12060
12080
|
* @overload resample(x_resolution = 72.0, y_resolution = 72.0, filter = self.filter, blur = self.blur)
|
12061
|
-
* @param x_resolution [
|
12062
|
-
* @param y_resolution [
|
12081
|
+
* @param x_resolution [Numeric] the target horizontal resolution.
|
12082
|
+
* @param y_resolution [Numeric] the target vertical resolution.
|
12063
12083
|
* @param filter [Magick::FilterType] the filter type
|
12064
|
-
* @param blur [
|
12084
|
+
* @param blur [Numeric] the blur size
|
12065
12085
|
* @return [Magick] a new image
|
12066
12086
|
* @see Image#resample!
|
12067
12087
|
*/
|
@@ -12078,10 +12098,10 @@ Image_resample(int argc, VALUE *argv, VALUE self)
|
|
12078
12098
|
* In-place form of {Image#resample}.
|
12079
12099
|
*
|
12080
12100
|
* @overload resample!(x_resolution = 72.0, y_resolution = 72.0, filter = self.filter, blur = self.blur)
|
12081
|
-
* @param x_resolution [
|
12082
|
-
* @param y_resolution [
|
12101
|
+
* @param x_resolution [Numeric] the target horizontal resolution.
|
12102
|
+
* @param y_resolution [Numeric] the target vertical resolution.
|
12083
12103
|
* @param filter [Magick::FilterType] the filter type
|
12084
|
-
* @param blur [
|
12104
|
+
* @param blur [Numeric] the blur size
|
12085
12105
|
* @return [Magick] a new image
|
12086
12106
|
* @see Image#resample
|
12087
12107
|
*/
|
@@ -12195,15 +12215,15 @@ resize(int bang, int argc, VALUE *argv, VALUE self)
|
|
12195
12215
|
* Scale an image to the desired dimensions using the specified filter and blur factor.
|
12196
12216
|
*
|
12197
12217
|
* @overload resize(scale)
|
12198
|
-
* @param scale [
|
12218
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12199
12219
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12200
12220
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12201
12221
|
*
|
12202
12222
|
* @overload resize(cols, rows, filter, blur)
|
12203
|
-
* @param cols [
|
12204
|
-
* @param rows [
|
12223
|
+
* @param cols [Numeric] The desired width
|
12224
|
+
* @param rows [Numeric] The desired height.
|
12205
12225
|
* @param filter [Magick::FilterType] the filter type
|
12206
|
-
* @param blur [
|
12226
|
+
* @param blur [Numeric] the blur size
|
12207
12227
|
*
|
12208
12228
|
* @return [Magick::Image] a new image
|
12209
12229
|
* @see Image#resize!
|
@@ -12221,15 +12241,15 @@ Image_resize(int argc, VALUE *argv, VALUE self)
|
|
12221
12241
|
* In-place form of {Image#resize}.
|
12222
12242
|
*
|
12223
12243
|
* @overload resize!(scale)
|
12224
|
-
* @param scale [
|
12244
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12225
12245
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12226
12246
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12227
12247
|
*
|
12228
12248
|
* @overload resize!(cols, rows, filter, blur)
|
12229
|
-
* @param cols [
|
12230
|
-
* @param rows [
|
12249
|
+
* @param cols [Numeric] The desired width
|
12250
|
+
* @param rows [Numeric] The desired height.
|
12231
12251
|
* @param filter [Magick::FilterType] the filter type
|
12232
|
-
* @param blur [
|
12252
|
+
* @param blur [Numeric] the blur size
|
12233
12253
|
*
|
12234
12254
|
* @return [Magick::Image] a new image
|
12235
12255
|
* @see Image#resize!
|
@@ -12342,10 +12362,10 @@ rotate(int bang, int argc, VALUE *argv, VALUE self)
|
|
12342
12362
|
* black.
|
12343
12363
|
*
|
12344
12364
|
* @overload rotate(degrees)
|
12345
|
-
* @param degrees [
|
12365
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12346
12366
|
*
|
12347
12367
|
* @overload rotate(degrees, qualifier)
|
12348
|
-
* @param degrees [
|
12368
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12349
12369
|
* @param qualifier [String] If present, either ">" or "<". If ">", rotates the image only if the
|
12350
12370
|
* image's width exceeds its height. If "<" rotates the image only if its height exceeds its
|
12351
12371
|
* width. If this argument is omitted the image is always rotated.
|
@@ -12366,10 +12386,10 @@ Image_rotate(int argc, VALUE *argv, VALUE self)
|
|
12366
12386
|
* In-place form of {Image#rotate}.
|
12367
12387
|
*
|
12368
12388
|
* @overload rotate!(degrees)
|
12369
|
-
* @param degrees [
|
12389
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12370
12390
|
*
|
12371
12391
|
* @overload rotate!(degrees, qualifier)
|
12372
|
-
* @param degrees [
|
12392
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12373
12393
|
* @param qualifier [String] If present, either ">" or "<". If ">", rotates the image only if the
|
12374
12394
|
* image's width exceeds its height. If "<" rotates the image only if its height exceeds its
|
12375
12395
|
* width. If this argument is omitted the image is always rotated.
|
@@ -12388,7 +12408,7 @@ Image_rotate_bang(int argc, VALUE *argv, VALUE self)
|
|
12388
12408
|
/**
|
12389
12409
|
* Return image rows.
|
12390
12410
|
*
|
12391
|
-
* @return [
|
12411
|
+
* @return [Integer] the image rows
|
12392
12412
|
*/
|
12393
12413
|
VALUE
|
12394
12414
|
Image_rows(VALUE self)
|
@@ -12402,7 +12422,7 @@ Image_rows(VALUE self)
|
|
12402
12422
|
* method does not introduce any additional color into the scaled image.
|
12403
12423
|
*
|
12404
12424
|
* @overload sample(scale)
|
12405
|
-
* @param scale [
|
12425
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12406
12426
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12407
12427
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12408
12428
|
*
|
@@ -12426,7 +12446,7 @@ Image_sample(int argc, VALUE *argv, VALUE self)
|
|
12426
12446
|
* In-place form of {Image#sample}.
|
12427
12447
|
*
|
12428
12448
|
* @overload sample!(scale)
|
12429
|
-
* @param scale [
|
12449
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12430
12450
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12431
12451
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12432
12452
|
*
|
@@ -12578,7 +12598,7 @@ scale(int bang, int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
12578
12598
|
* Return the scene number assigned to the image the last time the image was written to a
|
12579
12599
|
* multi-image image file.
|
12580
12600
|
*
|
12581
|
-
* @return [
|
12601
|
+
* @return [Integer] the image scene
|
12582
12602
|
*/
|
12583
12603
|
VALUE
|
12584
12604
|
Image_scene(VALUE self)
|
@@ -12591,16 +12611,16 @@ Image_scene(VALUE self)
|
|
12591
12611
|
* Selectively blur pixels within a contrast threshold.
|
12592
12612
|
*
|
12593
12613
|
* @overload selective_blur_channel(radius, sigma, threshold, channel = Magick::AllChannels)
|
12594
|
-
* @param radius [
|
12595
|
-
* @param sigma [
|
12596
|
-
* @param threshold [
|
12614
|
+
* @param radius [Numeric] the radius value
|
12615
|
+
* @param sigma [Numeric] the sigma value
|
12616
|
+
* @param threshold [Numeric, String] Either a number between 0.0 and 1.0 or a string in the form
|
12597
12617
|
* "NN%"
|
12598
12618
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
12599
12619
|
*
|
12600
12620
|
* @overload selective_blur_channel(radius, sigma, threshold, *channels)
|
12601
|
-
* @param radius [
|
12602
|
-
* @param sigma [
|
12603
|
-
* @param threshold [
|
12621
|
+
* @param radius [Numeric] the radius value
|
12622
|
+
* @param sigma [Numeric] the sigma value
|
12623
|
+
* @param threshold [Numeric, String] Either a number between 0.0 and 1.0 or a string in the form
|
12604
12624
|
* "NN%"
|
12605
12625
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
12606
12626
|
*
|
@@ -12739,7 +12759,7 @@ Image_separate(int argc, VALUE *argv, VALUE self)
|
|
12739
12759
|
* sepia toning.
|
12740
12760
|
*
|
12741
12761
|
* @overload sepiatone(threshold = Magick::QuantumRange)
|
12742
|
-
* @param threshold [
|
12762
|
+
* @param threshold [Numeric] Threshold ranges from 0 to QuantumRange and is a measure of the extent
|
12743
12763
|
* of the sepia toning. A threshold of 80% is a good starting point for a reasonable tone.
|
12744
12764
|
* @return [Magick::Image] a new image
|
12745
12765
|
*/
|
@@ -12781,9 +12801,9 @@ Image_sepiatone(int argc, VALUE *argv, VALUE self)
|
|
12781
12801
|
* @param colorspace [Magick::ColorspaceType] A ColorspaceType value. Empirical evidence suggests
|
12782
12802
|
* that distances in YUV or YIQ correspond to perceptual color differences more closely than do
|
12783
12803
|
* distances in RGB space. The image is then returned to RGB colorspace after color reduction.
|
12784
|
-
* @param cluster_threshold [
|
12804
|
+
* @param cluster_threshold [Numeric] The number of pixels in each cluster must exceed the the
|
12785
12805
|
* cluster threshold to be considered valid.
|
12786
|
-
* @param smoothing_threshold [
|
12806
|
+
* @param smoothing_threshold [Numeric] The smoothing threshold eliminates noise in the second
|
12787
12807
|
* derivative of the histogram. As the value is increased, you can expect a smoother second
|
12788
12808
|
* derivative.
|
12789
12809
|
* @param verbose [Boolean] If true, segment prints detailed information about the identified classes.
|
@@ -12844,10 +12864,12 @@ Image_segment(int argc, VALUE *argv, VALUE self)
|
|
12844
12864
|
* and the associated value is the property value.
|
12845
12865
|
*
|
12846
12866
|
* @overload properties
|
12847
|
-
* @return [Hash] the properties
|
12867
|
+
* @return [Hash<String, String>] the properties
|
12848
12868
|
*
|
12849
12869
|
* @overload properties
|
12850
|
-
* @yield [
|
12870
|
+
* @yield [property, value]
|
12871
|
+
* @yieldparam property [String] property key
|
12872
|
+
* @yieldparam value [String] property value
|
12851
12873
|
* @return [Magick::Image] self
|
12852
12874
|
*/
|
12853
12875
|
VALUE
|
@@ -12934,9 +12956,9 @@ Image_properties(VALUE self)
|
|
12934
12956
|
*
|
12935
12957
|
* @overload shade(shading = false, azimuth = 30.0, elevation = 30.0)
|
12936
12958
|
* @param shading [Boolean] If true, shade shades the intensity of each pixel.
|
12937
|
-
* @param azimuth [
|
12959
|
+
* @param azimuth [Numeric] The light source direction. The azimuth is measured in degrees. 0 is at
|
12938
12960
|
* 9 o'clock. Increasing values move the light source counter-clockwise.
|
12939
|
-
* @param elevation [
|
12961
|
+
* @param elevation [Numeric] The light source direction. The azimuth is measured in degrees. 0 is
|
12940
12962
|
* at 9 o'clock. Increasing values move the light source counter-clockwise.
|
12941
12963
|
* @return [Magick::Image] a new image
|
12942
12964
|
*/
|
@@ -12981,10 +13003,10 @@ Image_shade(int argc, VALUE *argv, VALUE self)
|
|
12981
13003
|
* @overload Image#shadow(x_offset = 4, y_offset = 4, sigma = 4.0, alpha = 1.0)
|
12982
13004
|
* @param x_offset [Numeric] The shadow x-offset
|
12983
13005
|
* @param y_offset [Numeric] The shadow y-offset
|
12984
|
-
* @param sigma [
|
13006
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator used to produce the
|
12985
13007
|
* shadow. The higher the number, the "blurrier" the shadow, but the longer it takes to produce
|
12986
13008
|
* the shadow. Must be > 0.0.
|
12987
|
-
* @param alpha [
|
13009
|
+
* @param alpha [Numeric, String] The percent alpha of the shadow. The argument may be a
|
12988
13010
|
* floating-point numeric value or a string in the form "NN%".
|
12989
13011
|
* @return [Magick::Image] a new image
|
12990
13012
|
*/
|
@@ -13037,8 +13059,8 @@ Image_shadow(int argc, VALUE *argv, VALUE self)
|
|
13037
13059
|
* Sharpen an image.
|
13038
13060
|
*
|
13039
13061
|
* @overload sharpen(radius = 0.0, sigma = 1.0)
|
13040
|
-
* @param radius [
|
13041
|
-
* @param sigma [
|
13062
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
13063
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
13042
13064
|
* @return [Magick::Image] a new image
|
13043
13065
|
*/
|
13044
13066
|
VALUE
|
@@ -13052,13 +13074,13 @@ Image_sharpen(int argc, VALUE *argv, VALUE self)
|
|
13052
13074
|
* Sharpen image on a channel.
|
13053
13075
|
*
|
13054
13076
|
* @overload sharpen_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
13055
|
-
* @param radius [
|
13056
|
-
* @param sigma [
|
13077
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
13078
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
13057
13079
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
13058
13080
|
*
|
13059
13081
|
* @overload sharpen_channel(radius = 0.0, sigma = 1.0, *channels)
|
13060
|
-
* @param radius [
|
13061
|
-
* @param sigma [
|
13082
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
13083
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
13062
13084
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
13063
13085
|
*
|
13064
13086
|
* @return [Magick::Image] a new image
|
@@ -13151,8 +13173,8 @@ Image_shave_bang(VALUE self, VALUE width, VALUE height)
|
|
13151
13173
|
* measured relative to the X axis. Empty triangles left over from shearing the image are filled
|
13152
13174
|
* with the background color.
|
13153
13175
|
*
|
13154
|
-
* @param x_shear [
|
13155
|
-
* @param y_shear [
|
13176
|
+
* @param x_shear [Numeric] the x shear (in degrees)
|
13177
|
+
* @param y_shear [Numeric] the y shear (in degrees)
|
13156
13178
|
* @return [Magick::Image] a new image
|
13157
13179
|
*/
|
13158
13180
|
VALUE
|
@@ -13181,10 +13203,9 @@ Image_shear(VALUE self, VALUE x_shear, VALUE y_shear)
|
|
13181
13203
|
* saturating highlights or shadows.
|
13182
13204
|
*
|
13183
13205
|
* @overload sigmoidal_contrast_channel(contrast = 3.0, midpoint = 50.0, sharpen = false, channel = Magick::AllChannels)
|
13184
|
-
|
13185
|
-
* @param contrast [Float] indicates how much to increase the contrast
|
13206
|
+
* @param contrast [Numeric] indicates how much to increase the contrast
|
13186
13207
|
* (0 is none; 3 is typical; 20 is pushing it)
|
13187
|
-
* @param midpoint [
|
13208
|
+
* @param midpoint [Numeric] indicates where midtones fall in the resultant image (0 is white; 50%
|
13188
13209
|
* is middle-gray; 100% is black). Note that "50%" means "50% of the quantum range." This argument
|
13189
13210
|
* is a number between 0 and QuantumRange. To specify "50%" use QuantumRange * 0.50.
|
13190
13211
|
* @param sharpen [Boolean] Set sharpen to true to increase the image contrast otherwise the
|
@@ -13192,9 +13213,9 @@ Image_shear(VALUE self, VALUE x_shear, VALUE y_shear)
|
|
13192
13213
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
13193
13214
|
*
|
13194
13215
|
* @overload sigmoidal_contrast_channel(contrast = 3.0, midpoint = 50.0, sharpen = false, *channels)
|
13195
|
-
* @param contrast [
|
13216
|
+
* @param contrast [Numeric] indicates how much to increase the contrast
|
13196
13217
|
* (0 is none; 3 is typical; 20 is pushing it)
|
13197
|
-
* @param midpoint [
|
13218
|
+
* @param midpoint [Numeric] indicates where midtones fall in the resultant image (0 is white; 50%
|
13198
13219
|
* is middle-gray; 100% is black). Note that "50%" means "50% of the quantum range." This argument
|
13199
13220
|
* is a number between 0 and QuantumRange. To specify "50%" use QuantumRange * 0.50.
|
13200
13221
|
* @param sharpen [Boolean] Set sharpen to true to increase the image contrast otherwise the
|
@@ -13294,9 +13315,9 @@ Image_signature(VALUE self)
|
|
13294
13315
|
* Simulates a pencil sketch. For best results start with a grayscale image.
|
13295
13316
|
*
|
13296
13317
|
* @overload sketch(radius = 0.0, sigma = 1.0, angle = 0.0)
|
13297
|
-
* @param radius [
|
13298
|
-
* @param sigma [
|
13299
|
-
* @param angle [
|
13318
|
+
* @param radius [Numeric] The radius
|
13319
|
+
* @param sigma [Numeric] The standard deviation
|
13320
|
+
* @param angle [Numeric] The angle (in degrees)
|
13300
13321
|
* @return [Magick::Image] a new image
|
13301
13322
|
* @see motion_blur
|
13302
13323
|
*/
|
@@ -13314,7 +13335,7 @@ Image_sketch(int argc, VALUE *argv, VALUE self)
|
|
13314
13335
|
* QuantumRange and is a measure of the extent of the solarization.
|
13315
13336
|
*
|
13316
13337
|
* @overload solarize(threshold = 50.0)
|
13317
|
-
* @param threshold [
|
13338
|
+
* @param threshold [Numeric] Ranges from 0 to QuantumRange and is a measure of the extent of the
|
13318
13339
|
* solarization.
|
13319
13340
|
* @return a new image
|
13320
13341
|
*/
|
@@ -13657,7 +13678,7 @@ Image_splice(int argc, VALUE *argv, VALUE self)
|
|
13657
13678
|
* Randomly displace each pixel in a block defined by "radius".
|
13658
13679
|
*
|
13659
13680
|
* @overload spread(radius = 3.0)
|
13660
|
-
* @param radius [
|
13681
|
+
* @param radius [Numeric] The radius
|
13661
13682
|
* @return [Magick::Image] a new image
|
13662
13683
|
*/
|
13663
13684
|
VALUE
|
@@ -14031,7 +14052,7 @@ Image_strip_bang(VALUE self)
|
|
14031
14052
|
* through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to
|
14032
14053
|
* 360.
|
14033
14054
|
*
|
14034
|
-
* @param degrees_obj [
|
14055
|
+
* @param degrees_obj [Numeric] the degrees
|
14035
14056
|
* @return [Magick::Image] a new image
|
14036
14057
|
*/
|
14037
14058
|
VALUE
|
@@ -14164,7 +14185,7 @@ Image_texture_flood_fill(VALUE self, VALUE color_obj, VALUE texture_obj,
|
|
14164
14185
|
* Change the value of individual pixels based on the intensity of each pixel compared to
|
14165
14186
|
* threshold. The result is a high-contrast, two color image.
|
14166
14187
|
*
|
14167
|
-
* @param threshold_obj [
|
14188
|
+
* @param threshold_obj [Numeric] the threshold
|
14168
14189
|
* @return [Magick::Image] a new image
|
14169
14190
|
*/
|
14170
14191
|
VALUE
|
@@ -14353,11 +14374,12 @@ thumbnail(int bang, int argc, VALUE *argv, VALUE self)
|
|
14353
14374
|
* image is < 10% of the original.
|
14354
14375
|
*
|
14355
14376
|
* @overload thumbnail(scale)
|
14356
|
-
* @param scale [
|
14377
|
+
* @param scale [Numeric] The desired size represented as a floating-point number. For example, to
|
14357
14378
|
* make a thumbnail that is 9.5% of the size of the original image, use 0.095.
|
14358
14379
|
*
|
14359
14380
|
* @overload thumbnail(cols, rows)
|
14360
14381
|
* @param cols [Numeric] The desired width in pixels.
|
14382
|
+
* @param rows [Numeric] The desired height.
|
14361
14383
|
*
|
14362
14384
|
* @return [Magick::Image] a new image
|
14363
14385
|
* @see Image#thumbnail!
|
@@ -14375,11 +14397,12 @@ Image_thumbnail(int argc, VALUE *argv, VALUE self)
|
|
14375
14397
|
* image is < 10% of the original. In-place form of {Image#thumbnail}.
|
14376
14398
|
*
|
14377
14399
|
* @overload thumbnail!(scale)
|
14378
|
-
* @param scale [
|
14400
|
+
* @param scale [Numeric] The desired size represented as a floating-point number. For example, to
|
14379
14401
|
* make a thumbnail that is 9.5% of the size of the original image, use 0.095.
|
14380
14402
|
*
|
14381
14403
|
* @overload thumbnail!(cols, rows)
|
14382
14404
|
* @param cols [Numeric] The desired width in pixels.
|
14405
|
+
* @param rows [Numeric] The desired height.
|
14383
14406
|
*
|
14384
14407
|
* @return [Magick::Image] a new image
|
14385
14408
|
* @see Image#thumbnail
|
@@ -14397,7 +14420,7 @@ Image_thumbnail_bang(int argc, VALUE *argv, VALUE self)
|
|
14397
14420
|
* This attribute is used in conjunction with the delay attribute to establish the amount of time
|
14398
14421
|
* that must elapse between frames in an animation.The default is 100.
|
14399
14422
|
*
|
14400
|
-
* @return [
|
14423
|
+
* @return [Integer] ticks per second
|
14401
14424
|
*/
|
14402
14425
|
VALUE
|
14403
14426
|
Image_ticks_per_second(VALUE self)
|
@@ -14431,10 +14454,10 @@ Image_ticks_per_second_eq(VALUE self, VALUE tps)
|
|
14431
14454
|
*
|
14432
14455
|
* @overload tint(tint, red_alpha, green_alpha = red_alpha, blue_alpha = red_alpha, alpha_alpha = 1.0)
|
14433
14456
|
* @param tint [Magick::Pixel, String] the color name
|
14434
|
-
* @param red_alpha [
|
14435
|
-
* @param green_alpha [
|
14436
|
-
* @param blue_alpha [
|
14437
|
-
* @param alpha_alpha [
|
14457
|
+
* @param red_alpha [Numeric] the red value
|
14458
|
+
* @param green_alpha [Numeric] the green value
|
14459
|
+
* @param blue_alpha [Numeric] the blue value
|
14460
|
+
* @param alpha_alpha [Numeric] the alpha value
|
14438
14461
|
* @return a new image
|
14439
14462
|
*/
|
14440
14463
|
VALUE
|
@@ -14508,6 +14531,8 @@ Image_tint(int argc, VALUE *argv, VALUE self)
|
|
14508
14531
|
* - The magick member of the Image structure determines the format of the
|
14509
14532
|
* returned blob (GIG, JPEG, PNG, etc.)
|
14510
14533
|
*
|
14534
|
+
* @yield [info]
|
14535
|
+
* @yieldparam info [Magick::Image::Info]
|
14511
14536
|
* @return [String] the blob
|
14512
14537
|
* @see Image#from_blob
|
14513
14538
|
*/
|
@@ -14638,7 +14663,7 @@ Image_to_color(VALUE self, VALUE pixel_arg)
|
|
14638
14663
|
/**
|
14639
14664
|
* Alias for {Image#number_colors}.
|
14640
14665
|
*
|
14641
|
-
* @return [
|
14666
|
+
* @return [Integer] number of unique colors
|
14642
14667
|
* @see Image#number_colors
|
14643
14668
|
*/
|
14644
14669
|
VALUE
|
@@ -14871,7 +14896,7 @@ Image_transpose(VALUE self)
|
|
14871
14896
|
* rotating them by 90 degrees.
|
14872
14897
|
* In-place form of {Image#transpose}.
|
14873
14898
|
*
|
14874
|
-
* @return [Magick::Image]
|
14899
|
+
* @return [Magick::Image] self
|
14875
14900
|
* @see Image#transpose
|
14876
14901
|
*/
|
14877
14902
|
VALUE
|
@@ -14901,7 +14926,7 @@ Image_transverse(VALUE self)
|
|
14901
14926
|
* them by 270 degrees
|
14902
14927
|
* In-place form of {Image#transverse}.
|
14903
14928
|
*
|
14904
|
-
* @return [Magick::Image]
|
14929
|
+
* @return [Magick::Image] self
|
14905
14930
|
* @see Image#transverse
|
14906
14931
|
*/
|
14907
14932
|
VALUE
|
@@ -15001,7 +15026,7 @@ Image_trim(int argc, VALUE *argv, VALUE self)
|
|
15001
15026
|
* image. This may cause the image to appear to be surrounded by blank or black space when viewed
|
15002
15027
|
* with an external viewer. This only occurs when the image is saved in a format (such as GIF)
|
15003
15028
|
* that saves offset information. To reset the offset data, use true as the argument to trim.
|
15004
|
-
* @return [Magick::Image]
|
15029
|
+
* @return [Magick::Image] self
|
15005
15030
|
* @see Image#trim
|
15006
15031
|
*/
|
15007
15032
|
VALUE
|
@@ -15278,11 +15303,11 @@ unsharp_mask_args(int argc, VALUE *argv, double *radius, double *sigma,
|
|
15278
15303
|
* apply the diffence amount.
|
15279
15304
|
*
|
15280
15305
|
* @overload unsharp_mask(radius = 0.0, sigma = 1.0, amount = 1.0, threshold = 0.05)
|
15281
|
-
* @param radius [
|
15282
|
-
* @param sigma [
|
15283
|
-
* @param amount [
|
15306
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
15307
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator.
|
15308
|
+
* @param amount [Numeric] The percentage of the blurred image to be added to the receiver,
|
15284
15309
|
* specified as a fraction between 0 and 1.0
|
15285
|
-
* @param threshold [
|
15310
|
+
* @param threshold [Numeric] The threshold needed to apply the amount, specified as a fraction
|
15286
15311
|
* between 0 and 1.0
|
15287
15312
|
* @return [Magick::Image] a new image
|
15288
15313
|
*/
|
@@ -15315,20 +15340,20 @@ Image_unsharp_mask(int argc, VALUE *argv, VALUE self)
|
|
15315
15340
|
* Only the specified channels are sharpened.
|
15316
15341
|
*
|
15317
15342
|
* @overload unsharp_mask(radius = 0.0, sigma = 1.0, amount = 1.0, threshold = 0.05, channel = Magick::AllChannels)
|
15318
|
-
* @param radius [
|
15319
|
-
* @param sigma [
|
15320
|
-
* @param amount [
|
15343
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
15344
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator.
|
15345
|
+
* @param amount [Numeric] The percentage of the blurred image to be added to the receiver,
|
15321
15346
|
* specified as a fraction between 0 and 1.0
|
15322
|
-
* @param threshold [
|
15347
|
+
* @param threshold [Numeric] The threshold needed to apply the amount, specified as a fraction
|
15323
15348
|
* between 0 and 1.0
|
15324
15349
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
15325
15350
|
*
|
15326
15351
|
* @overload unsharp_mask(radius = 0.0, sigma = 1.0, amount = 1.0, threshold = 0.05, *channels)
|
15327
|
-
* @param radius [
|
15328
|
-
* @param sigma [
|
15329
|
-
* @param amount [
|
15352
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
15353
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator.
|
15354
|
+
* @param amount [Numeric] The percentage of the blurred image to be added to the receiver,
|
15330
15355
|
* specified as a fraction between 0 and 1.0
|
15331
|
-
* @param threshold [
|
15356
|
+
* @param threshold [Numeric] The threshold needed to apply the amount, specified as a fraction
|
15332
15357
|
* between 0 and 1.0
|
15333
15358
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
15334
15359
|
*
|
@@ -15373,10 +15398,10 @@ Image_unsharp_mask_channel(int argc, VALUE *argv, VALUE self)
|
|
15373
15398
|
* Soften the edges of an image.
|
15374
15399
|
*
|
15375
15400
|
* @overload vignette(horz_radius = self.columns*0.1+0.5, vert_radius = self.rows*0.1+0.5, radius = 0.0, sigma = 1.0)
|
15376
|
-
* @param horz_radius [
|
15377
|
-
* @param vert_radius [
|
15378
|
-
* @param radius [
|
15379
|
-
* @param sigma [
|
15401
|
+
* @param horz_radius [Numeric] Influences the amount of background color in the horizontal dimension.
|
15402
|
+
* @param vert_radius [Numeric] Influences the amount of background color in the vertical dimension.
|
15403
|
+
* @param radius [Numeric] Controls the amount of blurring.
|
15404
|
+
* @param sigma [Numeric] Controls the amount of blurring.
|
15380
15405
|
* @return [Magick::Image] a new image
|
15381
15406
|
*/
|
15382
15407
|
VALUE
|
@@ -15478,11 +15503,11 @@ Image_virtual_pixel_method_eq(VALUE self, VALUE method)
|
|
15478
15503
|
* @overload watermark(mark, brightness = 1.0, saturation = 1.0, x_off = 0, y_off = 0)
|
15479
15504
|
* @param mark [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
15480
15505
|
* imagelist, uses the current image.
|
15481
|
-
* @param brightness [
|
15506
|
+
* @param brightness [Numeric, String] The fraction of the lightness component of the watermark pixels to be
|
15482
15507
|
* composited onto the target image. Must be a non-negative number or a string in the form
|
15483
15508
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15484
15509
|
* 25%. The default is 100%.
|
15485
|
-
* @param saturation [
|
15510
|
+
* @param saturation [Numeric, String] The fraction of the saturation component of the watermark pixels to
|
15486
15511
|
* be composited onto the target image. Must be a non-negative number or a string in the form
|
15487
15512
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15488
15513
|
* 25%. The default is 100%.
|
@@ -15493,11 +15518,11 @@ Image_virtual_pixel_method_eq(VALUE self, VALUE method)
|
|
15493
15518
|
* @overload watermark(mark, brightness, saturation, gravity, x_off = 0, y_off = 0)
|
15494
15519
|
* @param mark [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
15495
15520
|
* imagelist, uses the current image.
|
15496
|
-
* @param brightness [
|
15521
|
+
* @param brightness [Numeric, String] The fraction of the lightness component of the watermark pixels to be
|
15497
15522
|
* composited onto the target image. Must be a non-negative number or a string in the form
|
15498
15523
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15499
15524
|
* 25%. The default is 100%.
|
15500
|
-
* @param saturation [
|
15525
|
+
* @param saturation [Numeric, String] The fraction of the saturation component of the watermark pixels to
|
15501
15526
|
* be composited onto the target image. Must be a non-negative number or a string in the form
|
15502
15527
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15503
15528
|
* 25%. The default is 100%.
|
@@ -15525,7 +15550,7 @@ Image_watermark(int argc, VALUE *argv, VALUE self)
|
|
15525
15550
|
|
15526
15551
|
if (argc < 1)
|
15527
15552
|
{
|
15528
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
15553
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 to 6)", argc);
|
15529
15554
|
}
|
15530
15555
|
|
15531
15556
|
ovly = rm_cur_image(argv[0]);
|
@@ -15547,7 +15572,7 @@ Image_watermark(int argc, VALUE *argv, VALUE self)
|
|
15547
15572
|
case 1:
|
15548
15573
|
break;
|
15549
15574
|
default:
|
15550
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
15575
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 to 6)", argc);
|
15551
15576
|
break;
|
15552
15577
|
}
|
15553
15578
|
|
@@ -15580,8 +15605,8 @@ Image_watermark(int argc, VALUE *argv, VALUE self)
|
|
15580
15605
|
* amplitude and wavelength is specified by the given parameters.
|
15581
15606
|
*
|
15582
15607
|
* @overload wave(amplitude = 25.0, wavelength = 150.0)
|
15583
|
-
* @param amplitude [
|
15584
|
-
* @param wavelength [
|
15608
|
+
* @param amplitude [Numeric] the amplitude
|
15609
|
+
* @param wavelength [Numeric] the wave length
|
15585
15610
|
* @return [Magick::Image] a new image
|
15586
15611
|
*/
|
15587
15612
|
VALUE
|
@@ -15625,11 +15650,11 @@ Image_wave(int argc, VALUE *argv, VALUE self)
|
|
15625
15650
|
* appears in the reflection.
|
15626
15651
|
*
|
15627
15652
|
* @overload wet_floor(initial = 0.5, rate = 1.0)
|
15628
|
-
* @param initial [
|
15653
|
+
* @param initial [Numeric] A value between 0.0 and 1.0 that specifies the initial percentage of
|
15629
15654
|
* transparency. Higher values cause the top of the reflection to be more transparent, lower
|
15630
15655
|
* values less transparent. The default is 0.5, which means that the top of the reflection is 50%
|
15631
15656
|
* transparent.
|
15632
|
-
* @param rate [
|
15657
|
+
* @param rate [Numeric] A non-negative value that specifies how rapidly the reflection transitions
|
15633
15658
|
* from the initial level of transparency to entirely transparent. The default value is 1.0, which
|
15634
15659
|
* means that the transition occurs in 1/3 the image height. Values greater than 1.0 speed up the
|
15635
15660
|
* transition (the reflection will have fewer rows), values lower than 1.0 slow down the
|
@@ -15811,9 +15836,9 @@ Image_wet_floor(int argc, VALUE *argv, VALUE self)
|
|
15811
15836
|
* unchanged.
|
15812
15837
|
*
|
15813
15838
|
* @overload white_threshold(red, green, blue, alpha: alpha)
|
15814
|
-
* @param red [
|
15815
|
-
* @param green [
|
15816
|
-
* @param blue [
|
15839
|
+
* @param red [Numeric] the number for red channel
|
15840
|
+
* @param green [Numeric] the number for green channel
|
15841
|
+
* @param blue [Numeric] the number for blue channel
|
15817
15842
|
* @param alpha [Numeric] the number for alpha channel
|
15818
15843
|
* @return [Magick::Image] a new image
|
15819
15844
|
* @see Image#black_threshold
|
@@ -15923,6 +15948,8 @@ void add_format_prefix(Info *info, VALUE file)
|
|
15923
15948
|
* Write the image to the file.
|
15924
15949
|
*
|
15925
15950
|
* @param file [File, String] the file
|
15951
|
+
* @yield [info]
|
15952
|
+
* @yieldparam info [Magick::Image::Info]
|
15926
15953
|
* @return [Magick::Image] self
|
15927
15954
|
*/
|
15928
15955
|
VALUE
|
@@ -15997,8 +16024,8 @@ Image_x_resolution(VALUE self)
|
|
15997
16024
|
/**
|
15998
16025
|
* Set the horizontal resolution of the image.
|
15999
16026
|
*
|
16000
|
-
* @param val [
|
16001
|
-
* @return [
|
16027
|
+
* @param val [Numeric] the resolution
|
16028
|
+
* @return [Numeric] the given resolution
|
16002
16029
|
*/
|
16003
16030
|
VALUE
|
16004
16031
|
Image_x_resolution_eq(VALUE self, VALUE val)
|
@@ -16020,8 +16047,8 @@ Image_y_resolution(VALUE self)
|
|
16020
16047
|
/**
|
16021
16048
|
* Set the vertical resolution of the image.
|
16022
16049
|
*
|
16023
|
-
* @param val [
|
16024
|
-
* @return [
|
16050
|
+
* @param val [Numeric] the resolution
|
16051
|
+
* @return [Numeric] the given resolution
|
16025
16052
|
*/
|
16026
16053
|
VALUE
|
16027
16054
|
Image_y_resolution_eq(VALUE self, VALUE val)
|
@@ -16043,8 +16070,8 @@ Image_x_resolution(VALUE self)
|
|
16043
16070
|
/**
|
16044
16071
|
* Set the horizontal resolution of the image.
|
16045
16072
|
*
|
16046
|
-
* @param val [
|
16047
|
-
* @return [
|
16073
|
+
* @param val [Numeric] the resolution
|
16074
|
+
* @return [Numeric] the given resolution
|
16048
16075
|
*/
|
16049
16076
|
VALUE
|
16050
16077
|
Image_x_resolution_eq(VALUE self, VALUE val)
|
@@ -16066,8 +16093,8 @@ Image_y_resolution(VALUE self)
|
|
16066
16093
|
/**
|
16067
16094
|
* Set the vertical resolution of the image.
|
16068
16095
|
*
|
16069
|
-
* @param val [
|
16070
|
-
* @return [
|
16096
|
+
* @param val [Numeric] the resolution
|
16097
|
+
* @return [Numeric] the given resolution
|
16071
16098
|
*/
|
16072
16099
|
VALUE
|
16073
16100
|
Image_y_resolution_eq(VALUE self, VALUE val)
|