rmagick 5.4.4 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
- data/.devcontainer/devcontainer.json +1 -1
- data/.github/workflows/ci.yml +41 -31
- data/.gitignore +1 -0
- data/.rubocop.yml +36 -9
- data/.rubocop_todo.yml +369 -187
- data/CHANGELOG.md +77 -0
- data/Gemfile +14 -0
- data/README.md +3 -3
- data/Rakefile +12 -1
- data/before_install_linux.sh +1 -11
- data/before_install_osx.sh +5 -7
- data/ext/RMagick/extconf.rb +58 -68
- data/ext/RMagick/rmagick.h +7 -12
- data/ext/RMagick/rmdraw.cpp +10 -20
- data/ext/RMagick/rmfill.cpp +4 -4
- data/ext/RMagick/rmilist.cpp +10 -2
- data/ext/RMagick/rmimage.cpp +342 -344
- data/ext/RMagick/rminfo.cpp +22 -21
- data/ext/RMagick/rmkinfo.cpp +5 -18
- data/ext/RMagick/rmmain.cpp +42 -91
- data/ext/RMagick/rmmontage.cpp +5 -5
- data/ext/RMagick/rmpixel.cpp +3 -3
- data/ext/RMagick/rmutil.cpp +58 -89
- data/lib/rmagick/version.rb +3 -3
- data/lib/rmagick.rb +1 -1
- data/lib/rmagick_internal.rb +111 -103
- data/lib/rvg/container.rb +3 -3
- data/lib/rvg/embellishable.rb +7 -3
- data/lib/rvg/misc.rb +15 -15
- data/lib/rvg/rvg.rb +6 -6
- data/lib/rvg/stretchable.rb +2 -2
- data/lib/rvg/stylable.rb +2 -2
- data/lib/rvg/transformable.rb +1 -1
- data/lib/rvg/units.rb +1 -0
- data/rmagick.gemspec +2 -15
- data/sig/rmagick/_draw_common_methods.rbs +64 -0
- data/sig/rmagick/_image_common_methods.rbs +387 -0
- data/sig/rmagick/draw.rbs +38 -0
- data/sig/rmagick/draw_attribute.rbs +28 -0
- data/sig/rmagick/enum.rbs +820 -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 +196 -0
- data/sig/rmagick/image_list.rbs +183 -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 +38 -134
data/ext/RMagick/rmimage.cpp
CHANGED
@@ -288,17 +288,11 @@ DEFINE_GVL_STUB2(WriteImage, const ImageInfo *, Image *);
|
|
288
288
|
DEFINE_GVL_STUB4(GetImageChannelEntropy, const Image *, const ChannelType, double *, ExceptionInfo *);
|
289
289
|
#endif
|
290
290
|
|
291
|
-
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
292
291
|
DEFINE_GVL_STUB3(RotationalBlurImage, const Image *, const double, ExceptionInfo *);
|
293
|
-
#else
|
294
|
-
DEFINE_GVL_STUB3(RadialBlurImage, const Image *, const double, ExceptionInfo *);
|
295
|
-
#endif
|
296
292
|
|
297
293
|
#if defined(IMAGEMAGICK_7)
|
298
|
-
#elif defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
299
|
-
DEFINE_GVL_STUB4(RotationalBlurImageChannel, const Image *, const ChannelType, const double, ExceptionInfo *);
|
300
294
|
#else
|
301
|
-
DEFINE_GVL_STUB4(
|
295
|
+
DEFINE_GVL_STUB4(RotationalBlurImageChannel, const Image *, const ChannelType, const double, ExceptionInfo *);
|
302
296
|
#endif
|
303
297
|
|
304
298
|
/**
|
@@ -449,8 +443,8 @@ adaptive_channel_method(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
449
443
|
* than sigma. Use a radius of 0 and adaptive_blur selects a suitable radius for you.
|
450
444
|
*
|
451
445
|
* @overload adaptive_blur(radius = 0.0, sigma = 1.0)
|
452
|
-
* @param radius [
|
453
|
-
* @param sigma [
|
446
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
447
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
454
448
|
* @return [Magick::Image] a new image
|
455
449
|
*/
|
456
450
|
VALUE
|
@@ -464,13 +458,13 @@ Image_adaptive_blur(int argc, VALUE *argv, VALUE self)
|
|
464
458
|
* The same as {Magick::Image#adaptive_blur} except only the specified channels are blurred.
|
465
459
|
*
|
466
460
|
* @overload adaptive_blur_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
467
|
-
* @param radius [
|
468
|
-
* @param sigma [
|
461
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
462
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
469
463
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
470
464
|
*
|
471
465
|
* @overload adaptive_blur_channel(radius = 0.0, sigma = 1.0, *channels)
|
472
|
-
* @param radius [
|
473
|
-
* @param sigma [
|
466
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
467
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
474
468
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
475
469
|
*
|
476
470
|
* @return [Magick::Image] a new image
|
@@ -490,7 +484,7 @@ Image_adaptive_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
490
484
|
* Resizes the image with data dependent triangulation.
|
491
485
|
*
|
492
486
|
* @overload adaptive_resize(scale_val)
|
493
|
-
* @param scale_val [
|
487
|
+
* @param scale_val [Numeric] You can use this argument instead of specifying the desired width and
|
494
488
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
495
489
|
* the receiver.
|
496
490
|
*
|
@@ -557,8 +551,8 @@ Image_adaptive_resize(int argc, VALUE *argv, VALUE self)
|
|
557
551
|
* Use a radius of 0 and adaptive_sharpen selects a suitable radius for you.
|
558
552
|
*
|
559
553
|
* @overload adaptive_sharpen(radius = 0.0, sigma = 1.0)
|
560
|
-
* @param radius [
|
561
|
-
* @param sigma [
|
554
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
555
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
562
556
|
* @return [Magick::Image] a new image
|
563
557
|
*/
|
564
558
|
VALUE
|
@@ -572,13 +566,13 @@ Image_adaptive_sharpen(int argc, VALUE *argv, VALUE self)
|
|
572
566
|
* The same as {Magick::Image#adaptive_sharpen} except only the specified channels are sharpened.
|
573
567
|
*
|
574
568
|
* @overload adaptive_sharpen_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
575
|
-
* @param radius [
|
576
|
-
* @param sigma [
|
569
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
570
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
577
571
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
578
572
|
*
|
579
573
|
* @overload adaptive_sharpen_channel(radius = 0.0, sigma = 1.0, *channels)
|
580
|
-
* @param radius [
|
581
|
-
* @param sigma [
|
574
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels, not counting the center pixel.
|
575
|
+
* @param sigma [Numeric] The standard deviation of the Laplacian, in pixels.
|
582
576
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
583
577
|
*
|
584
578
|
* @return [Magick::Image] a new image
|
@@ -646,7 +640,7 @@ Image_adaptive_threshold(int argc, VALUE *argv, VALUE self)
|
|
646
640
|
* The areas of the destination image that are masked by white pixels will be modified by the
|
647
641
|
* {Magick::Image#composite} method, while areas masked by black pixels are unchanged.
|
648
642
|
*
|
649
|
-
* @param mask [Magick::Image] the composite mask
|
643
|
+
* @param mask [Magick::Image, Magick::ImageList] the composite mask
|
650
644
|
* @see Image#mask
|
651
645
|
* @see Image#delete_compose_mask
|
652
646
|
*/
|
@@ -660,7 +654,7 @@ Image_add_compose_mask(VALUE self, VALUE mask)
|
|
660
654
|
#endif
|
661
655
|
|
662
656
|
image = rm_check_frozen(self);
|
663
|
-
mask_image = rm_check_destroyed(mask);
|
657
|
+
mask_image = rm_check_destroyed(rm_cur_image(mask));
|
664
658
|
if (image->columns != mask_image->columns || image->rows != mask_image->rows)
|
665
659
|
{
|
666
660
|
rb_raise(rb_eArgError, "mask must be the same size as image");
|
@@ -972,12 +966,12 @@ Image_affine_transform(VALUE self, VALUE affine)
|
|
972
966
|
* "Comment", "Signature", and in some cases "EXIF".
|
973
967
|
*
|
974
968
|
* @param key_arg [String, Symbol] the key to get
|
975
|
-
* @return [String] property value or nil if key doesn't exist
|
969
|
+
* @return [String, nil] property value or nil if key doesn't exist
|
976
970
|
* @see Image#[]=
|
977
971
|
* @see Image#properties
|
978
972
|
*/
|
979
973
|
VALUE
|
980
|
-
Image_aref(VALUE self, VALUE key_arg)
|
974
|
+
Image_aref(VALUE self, VALUE key_arg)
|
981
975
|
{
|
982
976
|
Image *image;
|
983
977
|
const char *key;
|
@@ -1352,7 +1346,7 @@ Image_background_color_eq(VALUE self, VALUE color)
|
|
1352
1346
|
/**
|
1353
1347
|
* Return the number of rows (before transformations).
|
1354
1348
|
*
|
1355
|
-
* @return [
|
1349
|
+
* @return [Integer] the number of rows
|
1356
1350
|
*/
|
1357
1351
|
VALUE
|
1358
1352
|
Image_base_columns(VALUE self)
|
@@ -1383,7 +1377,7 @@ Image_base_filename(VALUE self)
|
|
1383
1377
|
/**
|
1384
1378
|
* Return the number of rows (before transformations).
|
1385
1379
|
*
|
1386
|
-
* @return [
|
1380
|
+
* @return [Integer] the number of rows
|
1387
1381
|
*/
|
1388
1382
|
VALUE
|
1389
1383
|
Image_base_rows(VALUE self)
|
@@ -1429,8 +1423,8 @@ Image_bias(VALUE self)
|
|
1429
1423
|
/**
|
1430
1424
|
* Set image bias (used when convolving an image).
|
1431
1425
|
*
|
1432
|
-
* @param pct [
|
1433
|
-
* @return [
|
1426
|
+
* @param pct [Numeric, String] Either a number between 0.0 and 1.0 or a string in the form "NN%"
|
1427
|
+
* @return [Numeric, String] the given value
|
1434
1428
|
*/
|
1435
1429
|
VALUE
|
1436
1430
|
Image_bias_eq(VALUE self, VALUE pct)
|
@@ -1460,10 +1454,11 @@ Image_bias_eq(VALUE self, VALUE pct)
|
|
1460
1454
|
* is a high-contrast image.
|
1461
1455
|
*
|
1462
1456
|
* @overload bilevel_channel(threshold, channel = Magick::AllChannels)
|
1463
|
-
* @param threshold [
|
1457
|
+
* @param threshold [Numeric] The threshold value, a number between 0 and QuantumRange.
|
1458
|
+
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
1464
1459
|
*
|
1465
1460
|
* @overload bilevel_channel(threshold, *channels)
|
1466
|
-
* @param threshold [
|
1461
|
+
* @param threshold [Numeric] The threshold value, a number between 0 and QuantumRange.
|
1467
1462
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
1468
1463
|
*
|
1469
1464
|
* @return [Magick::Image] a new image
|
@@ -1923,10 +1918,10 @@ special_composite(Image *image, Image *overlay, double image_pct, double overlay
|
|
1923
1918
|
* @overload blend(overlay, src_percent, dst_percent, gravity = Magick::NorthWestGravity, x_offset = 0, y_offset = 0)
|
1924
1919
|
* @param overlay [Magick::Image, Magick::ImageList] The source image for the composite operation.
|
1925
1920
|
* Either an imagelist or an image. If an imagelist, uses the current image.
|
1926
|
-
* @param src_percent [
|
1921
|
+
* @param src_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
1927
1922
|
* If src_percentage is a number it is interpreted as a percentage.
|
1928
1923
|
* Both 0.25 and "25%" mean 25%. This argument is required.
|
1929
|
-
* @param dst_percent [
|
1924
|
+
* @param dst_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
1930
1925
|
* If src_percentage is a number it is interpreted as a percentage.
|
1931
1926
|
* Both 0.25 and "25%" mean 25%. This argument may omitted if no other arguments follow it.
|
1932
1927
|
* In this case the default is 100%-src_percentage.
|
@@ -1988,7 +1983,7 @@ Image_blend(int argc, VALUE *argv, VALUE self)
|
|
1988
1983
|
* Simulate a scene at nighttime in the moonlight.
|
1989
1984
|
*
|
1990
1985
|
* @overload blue_shift(factor = 1.5)
|
1991
|
-
* @param factor [
|
1986
|
+
* @param factor [Numeric] Larger values increase the effect.
|
1992
1987
|
* @return [Magick::Image] a new image
|
1993
1988
|
*/
|
1994
1989
|
VALUE
|
@@ -2027,13 +2022,13 @@ Image_blue_shift(int argc, VALUE *argv, VALUE self)
|
|
2027
2022
|
* Convolves the image with a Gaussian operator of the given radius and standard deviation (sigma).
|
2028
2023
|
*
|
2029
2024
|
* @overload blur_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
2030
|
-
* @param radius [
|
2031
|
-
* @param sigma [
|
2025
|
+
* @param radius [Numeric] the radius value
|
2026
|
+
* @param sigma [Numeric] the sigma value
|
2032
2027
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
2033
2028
|
*
|
2034
2029
|
* @overload blur_channel(radius = 0.0, sigma = 1.0, *channels)
|
2035
|
-
* @param radius [
|
2036
|
-
* @param sigma [
|
2030
|
+
* @param radius [Numeric] the radius value
|
2031
|
+
* @param sigma [Numeric] the sigma value
|
2037
2032
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2038
2033
|
*
|
2039
2034
|
* @return [Magick::Image] a new image
|
@@ -2085,8 +2080,8 @@ Image_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
2085
2080
|
* Blur the image.
|
2086
2081
|
*
|
2087
2082
|
* @overload blur_image(radius = 0.0, sigma = 1.0)
|
2088
|
-
* @param radius [
|
2089
|
-
* @param sigma [
|
2083
|
+
* @param radius [Numeric] the radius value
|
2084
|
+
* @param sigma [Numeric] the sigma value
|
2090
2085
|
* @return [Magick::Image] a new image
|
2091
2086
|
*/
|
2092
2087
|
VALUE
|
@@ -2264,7 +2259,8 @@ Image_bounding_box(VALUE self)
|
|
2264
2259
|
* importantly, you can capture menus or other popups that are independent windows but appear
|
2265
2260
|
* over the specified window.
|
2266
2261
|
* @param borders [Boolean] If true, include the border in the image.
|
2267
|
-
* @yield [
|
2262
|
+
* @yield [info]
|
2263
|
+
* @yieldparam info [Magick::Image::Info]
|
2268
2264
|
*
|
2269
2265
|
* @return [Magick::Image] a new image
|
2270
2266
|
* @example
|
@@ -2325,6 +2321,7 @@ Image_capture(int argc, VALUE *argv, VALUE self ATTRIBUTE_UNUSED)
|
|
2325
2321
|
rm_ensure_result(new_image);
|
2326
2322
|
|
2327
2323
|
rm_set_user_artifact(new_image, image_info);
|
2324
|
+
rm_sync_image_options(new_image, image_info);
|
2328
2325
|
|
2329
2326
|
RB_GC_GUARD(info_obj);
|
2330
2327
|
|
@@ -2337,10 +2334,10 @@ Image_capture(int argc, VALUE *argv, VALUE self ATTRIBUTE_UNUSED)
|
|
2337
2334
|
* For example, you can specify that the image should be resized such that the aspect ratio should
|
2338
2335
|
* be retained but the resulting image should be no larger than 640 pixels wide and 480 pixels tall.
|
2339
2336
|
*
|
2340
|
-
* @param geom_arg [String] the geometry
|
2337
|
+
* @param geom_arg [Magick::Geometry, String] the geometry
|
2341
2338
|
* @yield [column, row, image]
|
2342
|
-
* @yieldparam column [
|
2343
|
-
* @yieldparam row [
|
2339
|
+
* @yieldparam column [Integer] The desired column size
|
2340
|
+
* @yieldparam row [Integer] The desired row size
|
2344
2341
|
* @yieldparam image [Magick::Image] self
|
2345
2342
|
* @see https://www.imagemagick.org/Magick++/Geometry.html
|
2346
2343
|
* @example
|
@@ -2445,7 +2442,7 @@ Image_channel(VALUE self, VALUE channel_arg)
|
|
2445
2442
|
* @overload channel_depth(*channels)
|
2446
2443
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2447
2444
|
*
|
2448
|
-
* @return [
|
2445
|
+
* @return [Integer] the channel depth
|
2449
2446
|
*/
|
2450
2447
|
VALUE
|
2451
2448
|
Image_channel_depth(int argc, VALUE *argv, VALUE self)
|
@@ -2492,7 +2489,7 @@ Image_channel_depth(int argc, VALUE *argv, VALUE self)
|
|
2492
2489
|
* @overload channel_extrema(*channels)
|
2493
2490
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2494
2491
|
*
|
2495
|
-
* @return [Array<
|
2492
|
+
* @return [Array<Integer>] The first element in the array is the minimum value. The second element is the
|
2496
2493
|
* maximum value.
|
2497
2494
|
*/
|
2498
2495
|
VALUE
|
@@ -2656,8 +2653,8 @@ Image_channel_entropy(int argc ATTRIBUTE_UNUSED, VALUE *argv ATTRIBUTE_UNUSED, V
|
|
2656
2653
|
* Return a new image that is a copy of the input image with the edges highlighted.
|
2657
2654
|
*
|
2658
2655
|
* @overload charcoal(radius = 0.0, sigma = 1.0)
|
2659
|
-
* @param radius [
|
2660
|
-
* @param sigma [
|
2656
|
+
* @param radius [Numeric] The radius of the pixel neighborhood.
|
2657
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian, in pixels.
|
2661
2658
|
* @return [Magick::Image] a new image
|
2662
2659
|
*/
|
2663
2660
|
VALUE
|
@@ -2763,11 +2760,11 @@ Image_clone(VALUE self)
|
|
2763
2760
|
* the CLUT image.
|
2764
2761
|
*
|
2765
2762
|
* @overload clut_channel(clut_image, channel = Magick::AllChannels)
|
2766
|
-
* @param clut_image [Magick::Image] The LUT gradient image.
|
2763
|
+
* @param clut_image [Magick::Image, Magick::ImageList] The LUT gradient image.
|
2767
2764
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
2768
2765
|
*
|
2769
2766
|
* @overload clut_channel(clut_image, *channels)
|
2770
|
-
* @param clut_image [Magick::Image] The LUT gradient image.
|
2767
|
+
* @param clut_image [Magick::Image, Magick::ImageList] The LUT gradient image.
|
2771
2768
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
2772
2769
|
*
|
2773
2770
|
* @return [Magick::Image] self
|
@@ -2787,7 +2784,7 @@ Image_clut_channel(int argc, VALUE *argv, VALUE self)
|
|
2787
2784
|
// check_destroyed before confirming the arguments
|
2788
2785
|
if (argc >= 1)
|
2789
2786
|
{
|
2790
|
-
rm_check_destroyed(argv[0]);
|
2787
|
+
clut = rm_check_destroyed(rm_cur_image(argv[0]));
|
2791
2788
|
channels = extract_channels(&argc, argv);
|
2792
2789
|
if (argc != 1)
|
2793
2790
|
{
|
@@ -2799,8 +2796,6 @@ Image_clut_channel(int argc, VALUE *argv, VALUE self)
|
|
2799
2796
|
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or more)", argc);
|
2800
2797
|
}
|
2801
2798
|
|
2802
|
-
TypedData_Get_Struct(argv[0], Image, &rm_image_data_type, clut);
|
2803
|
-
|
2804
2799
|
#if defined(IMAGEMAGICK_7)
|
2805
2800
|
exception = AcquireExceptionInfo();
|
2806
2801
|
BEGIN_CHANNEL_MASK(image, channels);
|
@@ -2829,7 +2824,7 @@ Image_clut_channel(int argc, VALUE *argv, VALUE self)
|
|
2829
2824
|
/**
|
2830
2825
|
* Computes the number of times each unique color appears in the image.
|
2831
2826
|
*
|
2832
|
-
* @return [Hash] Each key in the hash is a pixel representing a color that appears in the image.
|
2827
|
+
* @return [Hash<Magick::Pixel, Integer>] Each key in the hash is a pixel representing a color that appears in the image.
|
2833
2828
|
* The value associated with the key is the number of times that color appears in the image.
|
2834
2829
|
*/
|
2835
2830
|
VALUE
|
@@ -3052,8 +3047,8 @@ Image_color_profile(VALUE self)
|
|
3052
3047
|
* - Pass nil to remove any existing profile.
|
3053
3048
|
* - Removes any existing profile before adding the new one.
|
3054
3049
|
*
|
3055
|
-
* @param profile [String] the profile to set
|
3056
|
-
* @return [String] the given profile
|
3050
|
+
* @param profile [String, nil] the profile to set
|
3051
|
+
* @return [String, nil] the given profile
|
3057
3052
|
*/
|
3058
3053
|
VALUE
|
3059
3054
|
Image_color_profile_eq(VALUE self, VALUE profile)
|
@@ -3165,16 +3160,16 @@ Image_color_flood_fill(VALUE self, VALUE target_color, VALUE fill_color,
|
|
3165
3160
|
* blend for each r, g, b component.
|
3166
3161
|
*
|
3167
3162
|
* @overload colorize(red, green, blue, target)
|
3168
|
-
* @param red [
|
3169
|
-
* @param green [
|
3170
|
-
* @param blue [
|
3163
|
+
* @param red [Numeric] The percentage of the fill color red
|
3164
|
+
* @param green [Numeric] The percentage of the fill color green
|
3165
|
+
* @param blue [Numeric] The percentage of the fill color blue
|
3171
3166
|
* @param target [Magick::Pixel, String] the color name
|
3172
3167
|
*
|
3173
3168
|
* @overload colorize(red, green, blue, matte, target)
|
3174
|
-
* @param red [
|
3175
|
-
* @param green [
|
3176
|
-
* @param blue [
|
3177
|
-
* @param matte [
|
3169
|
+
* @param red [Numeric] The percentage of the fill color red
|
3170
|
+
* @param green [Numeric] The percentage of the fill color green
|
3171
|
+
* @param blue [Numeric] The percentage of the fill color blue
|
3172
|
+
* @param matte [Numeric] The percentage of the fill color transparency
|
3178
3173
|
* @param target [Magick::Pixel, String] the color name
|
3179
3174
|
*
|
3180
3175
|
* @return [Magick::Image] a new image
|
@@ -3323,7 +3318,7 @@ Image_colormap(int argc, VALUE *argv, VALUE self)
|
|
3323
3318
|
/**
|
3324
3319
|
* Get the number of colors in the colormap.
|
3325
3320
|
*
|
3326
|
-
* @return [
|
3321
|
+
* @return [Integer] the number of colors
|
3327
3322
|
*/
|
3328
3323
|
VALUE
|
3329
3324
|
Image_colors(VALUE self)
|
@@ -3385,7 +3380,7 @@ Image_colorspace_eq(VALUE self, VALUE colorspace)
|
|
3385
3380
|
/**
|
3386
3381
|
* Get image columns.
|
3387
3382
|
*
|
3388
|
-
* @return [
|
3383
|
+
* @return [Integer] the columns
|
3389
3384
|
*/
|
3390
3385
|
VALUE
|
3391
3386
|
Image_columns(VALUE self)
|
@@ -3415,13 +3410,13 @@ Image_columns(VALUE self)
|
|
3415
3410
|
* imagelist, uses the current image.
|
3416
3411
|
* @param metric [Magick::MetricType] The desired distortion metric.
|
3417
3412
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
3418
|
-
* @yield [
|
3413
|
+
* @yield [opt_args]
|
3414
|
+
* @yieldparam opt_args [Magick::OptionalMethodArguments]
|
3419
3415
|
*
|
3420
3416
|
* @overload compare_channel(image, metric, *channels)
|
3421
3417
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
3422
3418
|
* imagelist, uses the current image.
|
3423
3419
|
* @param metric [Magick::MetricType] The desired distortion metric.
|
3424
|
-
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
3425
3420
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
3426
3421
|
*
|
3427
3422
|
* @overload compare_channel(image, metric, *channels)
|
@@ -3434,9 +3429,9 @@ Image_columns(VALUE self)
|
|
3434
3429
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
3435
3430
|
* imagelist, uses the current image.
|
3436
3431
|
* @param metric [Magick::MetricType] The desired distortion metric.
|
3437
|
-
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
3438
3432
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
3439
|
-
* @yield [
|
3433
|
+
* @yield [opt_args]
|
3434
|
+
* @yieldparam opt_args [Magick::OptionalMethodArguments]
|
3440
3435
|
*
|
3441
3436
|
* @return [Array] The first element is a difference image, the second is a the value of the
|
3442
3437
|
* computed distortion represented as a Float.
|
@@ -3797,7 +3792,7 @@ Image_composite(int argc, VALUE *argv, VALUE self)
|
|
3797
3792
|
/**
|
3798
3793
|
* Composite the source over the destination image as dictated by the affine transform.
|
3799
3794
|
*
|
3800
|
-
* @param source [Magick::Image] the source image
|
3795
|
+
* @param source [Magick::Image, Magick::ImageList] the source image
|
3801
3796
|
* @param affine_matrix [Magick::AffineMatrix] affine transform matrix
|
3802
3797
|
* @return [Magick::Image] a new image
|
3803
3798
|
*/
|
@@ -3811,7 +3806,7 @@ Image_composite_affine(VALUE self, VALUE source, VALUE affine_matrix)
|
|
3811
3806
|
#endif
|
3812
3807
|
|
3813
3808
|
image = rm_check_destroyed(self);
|
3814
|
-
composite_image = rm_check_destroyed(source);
|
3809
|
+
composite_image = rm_check_destroyed(rm_cur_image(source));
|
3815
3810
|
|
3816
3811
|
Export_AffineMatrix(&affine, affine_matrix);
|
3817
3812
|
new_image = rm_clone_image(image);
|
@@ -4027,19 +4022,19 @@ Image_composite_channel_bang(int argc, VALUE *argv, VALUE self)
|
|
4027
4022
|
* @overload composite_mathematics(image, a, b, c, d, gravity)
|
4028
4023
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
4029
4024
|
* imagelist, uses the current image.
|
4030
|
-
* @param a [
|
4031
|
-
* @param b [
|
4032
|
-
* @param c [
|
4033
|
-
* @param d [
|
4025
|
+
* @param a [Numeric] See the description.
|
4026
|
+
* @param b [Numeric] See the description.
|
4027
|
+
* @param c [Numeric] See the description.
|
4028
|
+
* @param d [Numeric] See the description.
|
4034
4029
|
* @param gravity [Magick::GravityType] the gravity type
|
4035
4030
|
*
|
4036
4031
|
* @overload composite_mathematics(image, a, b, c, d, x_off, y_off)
|
4037
4032
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
4038
4033
|
* imagelist, uses the current image.
|
4039
|
-
* @param a [
|
4040
|
-
* @param b [
|
4041
|
-
* @param c [
|
4042
|
-
* @param d [
|
4034
|
+
* @param a [Numeric] See the description.
|
4035
|
+
* @param b [Numeric] See the description.
|
4036
|
+
* @param c [Numeric] See the description.
|
4037
|
+
* @param d [Numeric] See the description.
|
4043
4038
|
* @param x_off [Numeric] The x-offset of the composited image, measured relative to the gravity
|
4044
4039
|
* argument.
|
4045
4040
|
* @param y_off [Numeric] The y-offset of the composited image, measured relative to the gravity
|
@@ -4048,10 +4043,10 @@ Image_composite_channel_bang(int argc, VALUE *argv, VALUE self)
|
|
4048
4043
|
* @overload composite_mathematics(image, a, b, c, d, gravity, x_off, y_off)
|
4049
4044
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
4050
4045
|
* imagelist, uses the current image.
|
4051
|
-
* @param a [
|
4052
|
-
* @param b [
|
4053
|
-
* @param c [
|
4054
|
-
* @param d [
|
4046
|
+
* @param a [Numeric] See the description.
|
4047
|
+
* @param b [Numeric] See the description.
|
4048
|
+
* @param c [Numeric] See the description.
|
4049
|
+
* @param d [Numeric] See the description.
|
4055
4050
|
* @param gravity [Magick::GravityType] the gravity type
|
4056
4051
|
* @param x_off [Numeric] The x-offset of the composited image, measured relative to the gravity
|
4057
4052
|
* argument.
|
@@ -4582,7 +4577,7 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4582
4577
|
}
|
4583
4578
|
else
|
4584
4579
|
{
|
4585
|
-
*black_point = pixels * rm_str_to_pct(argv[0]);
|
4580
|
+
*black_point = pixels * rm_str_to_pct(argv[0], true);
|
4586
4581
|
}
|
4587
4582
|
if (rm_check_num2dbl(argv[1]))
|
4588
4583
|
{
|
@@ -4590,7 +4585,7 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4590
4585
|
}
|
4591
4586
|
else
|
4592
4587
|
{
|
4593
|
-
*white_point = pixels * rm_str_to_pct(argv[1]);
|
4588
|
+
*white_point = pixels * rm_str_to_pct(argv[1], true);
|
4594
4589
|
}
|
4595
4590
|
break;
|
4596
4591
|
|
@@ -4601,7 +4596,7 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4601
4596
|
}
|
4602
4597
|
else
|
4603
4598
|
{
|
4604
|
-
*black_point = pixels * rm_str_to_pct(argv[0]);
|
4599
|
+
*black_point = pixels * rm_str_to_pct(argv[0], true);
|
4605
4600
|
}
|
4606
4601
|
*white_point = pixels - *black_point;
|
4607
4602
|
break;
|
@@ -4622,17 +4617,17 @@ get_black_white_point(Image *image, int argc, VALUE *argv, double *black_point,
|
|
4622
4617
|
* a linear scaling function to the image pixel values.
|
4623
4618
|
*
|
4624
4619
|
* @overload contrast_stretch_channel(black_point, white_point = pixels - black_point, channel = Magick::AllChannels)
|
4625
|
-
* @param black_point [
|
4620
|
+
* @param black_point [Numeric, String] black out at most this many pixels. Specify an absolute
|
4626
4621
|
* number of pixels as a numeric value, or a percentage as a string in the form 'NN%'.
|
4627
|
-
* @param white_point [
|
4622
|
+
* @param white_point [Numeric, String] burn at most this many pixels. Specify an absolute number
|
4628
4623
|
* of pixels as a numeric value, or a percentage as a string in the form 'NN%'. This argument
|
4629
4624
|
* is optional. If not specified the default is `(columns * rows) - black_point`.
|
4630
4625
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
4631
4626
|
*
|
4632
4627
|
* @overload contrast_stretch_channel(black_point, white_point = pixels - black_point, *channels)
|
4633
|
-
* @param black_point [
|
4628
|
+
* @param black_point [Numeric, String] black out at most this many pixels. Specify an absolute
|
4634
4629
|
* number of pixels as a numeric value, or a percentage as a string in the form 'NN%'.
|
4635
|
-
* @param white_point [
|
4630
|
+
* @param white_point [Numeric, String] burn at most this many pixels. Specify an absolute number of
|
4636
4631
|
* pixels as a numeric value, or a percentage as a string in the form 'NN%'. This argument is
|
4637
4632
|
* optional. If not specified the default is all pixels - black_point pixels.
|
4638
4633
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
@@ -4707,7 +4702,7 @@ Image_morphology(VALUE self, VALUE method_v, VALUE iterations, VALUE kernel_v)
|
|
4707
4702
|
*
|
4708
4703
|
* @param channel_v [Magick::ChannelType] a channel type
|
4709
4704
|
* @param method_v [Magick::MorphologyMethod] the morphology method
|
4710
|
-
* @param
|
4705
|
+
* @param iterations_v [Numeric] apply the operation this many times (or no change).
|
4711
4706
|
* A value of -1 means loop until no change found.
|
4712
4707
|
* How this is applied may depend on the morphology method.
|
4713
4708
|
* Typically this is a value of 1.
|
@@ -4716,19 +4711,19 @@ Image_morphology(VALUE self, VALUE method_v, VALUE iterations, VALUE kernel_v)
|
|
4716
4711
|
*/
|
4717
4712
|
|
4718
4713
|
VALUE
|
4719
|
-
Image_morphology_channel(VALUE self, VALUE channel_v, VALUE method_v, VALUE
|
4714
|
+
Image_morphology_channel(VALUE self, VALUE channel_v, VALUE method_v, VALUE iterations_v, VALUE kernel_v)
|
4720
4715
|
{
|
4721
4716
|
Image *image, *new_image;
|
4722
4717
|
ExceptionInfo *exception;
|
4723
4718
|
MorphologyMethod method;
|
4724
4719
|
ChannelType channel;
|
4725
4720
|
KernelInfo *kernel;
|
4721
|
+
ssize_t iterations = NUM2LONG(iterations_v);;
|
4726
4722
|
|
4727
4723
|
image = rm_check_destroyed(self);
|
4728
4724
|
|
4729
4725
|
VALUE_TO_ENUM(method_v, method, MorphologyMethod);
|
4730
4726
|
VALUE_TO_ENUM(channel_v, channel, ChannelType);
|
4731
|
-
Check_Type(iterations, T_FIXNUM);
|
4732
4727
|
|
4733
4728
|
if (TYPE(kernel_v) == T_STRING)
|
4734
4729
|
{
|
@@ -4746,12 +4741,12 @@ Image_morphology_channel(VALUE self, VALUE channel_v, VALUE method_v, VALUE iter
|
|
4746
4741
|
|
4747
4742
|
#if defined(IMAGEMAGICK_7)
|
4748
4743
|
BEGIN_CHANNEL_MASK(image, channel);
|
4749
|
-
GVL_STRUCT_TYPE(MorphologyImage) args = { image, method,
|
4744
|
+
GVL_STRUCT_TYPE(MorphologyImage) args = { image, method, iterations, kernel, exception };
|
4750
4745
|
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(MorphologyImage), &args);
|
4751
4746
|
CHANGE_RESULT_CHANNEL_MASK(new_image);
|
4752
4747
|
END_CHANNEL_MASK(image);
|
4753
4748
|
#else
|
4754
|
-
GVL_STRUCT_TYPE(MorphologyImageChannel) args = { image, channel, method,
|
4749
|
+
GVL_STRUCT_TYPE(MorphologyImageChannel) args = { image, channel, method, iterations, kernel, exception };
|
4755
4750
|
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(MorphologyImageChannel), &args);
|
4756
4751
|
#endif
|
4757
4752
|
rm_check_exception(exception, new_image, DestroyOnError);
|
@@ -5049,26 +5044,26 @@ Image_crop(int argc, VALUE *argv, VALUE self)
|
|
5049
5044
|
* Extract a region of the image defined by width, height, x, y.
|
5050
5045
|
* In-place form of {Image#crop}.
|
5051
5046
|
*
|
5052
|
-
* @overload crop!(
|
5053
|
-
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5047
|
+
* @overload crop!(x, y, width, height, reset = false)
|
5054
5048
|
* @param x [Numeric] x position of start of region
|
5055
5049
|
* @param y [Numeric] y position of start of region
|
5056
5050
|
* @param width [Numeric] width of region
|
5057
5051
|
* @param height [Numeric] height of region
|
5058
|
-
*
|
5059
|
-
* @overload crop!(reset = false, gravity, width, height)
|
5060
5052
|
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5053
|
+
*
|
5054
|
+
* @overload crop!(gravity, width, height, reset = false)
|
5061
5055
|
* @param gravity [Magick::GravityType] the gravity type
|
5062
5056
|
* @param width [Numeric] width of region
|
5063
5057
|
* @param height [Numeric] height of region
|
5064
|
-
|
5065
|
-
* @overload crop!(reset = false, gravity, x, y, width, height)
|
5066
5058
|
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5059
|
+
|
5060
|
+
* @overload crop!(gravity, x, y, width, height, reset = false)
|
5067
5061
|
* @param gravity [Magick::GravityType] the gravity type
|
5068
5062
|
* @param x [Numeric] x position of start of region
|
5069
5063
|
* @param y [Numeric] y position of start of region
|
5070
5064
|
* @param width [Numeric] width of region
|
5071
5065
|
* @param height [Numeric] height of region
|
5066
|
+
* @param reset [Boolean] true if reset the cropped image page canvas and position
|
5072
5067
|
*
|
5073
5068
|
* @return [Magick::Image] a new image
|
5074
5069
|
* @see Image#crop!
|
@@ -5154,8 +5149,8 @@ Image_density(VALUE self)
|
|
5154
5149
|
* resolution. The height attribute is used for the y resolution. If the height attribute is
|
5155
5150
|
* missing, the width attribute is used for both.
|
5156
5151
|
*
|
5157
|
-
* @param density_arg [
|
5158
|
-
* @return [
|
5152
|
+
* @param density_arg [Magick::Geometry, String] The density String or Geometry
|
5153
|
+
* @return [Magick::Geometry, String] the given value
|
5159
5154
|
* @see https://www.imagemagick.org/Magick++/Geometry.html
|
5160
5155
|
*/
|
5161
5156
|
VALUE
|
@@ -5273,8 +5268,8 @@ Image_decipher(VALUE self, VALUE passphrase)
|
|
5273
5268
|
* - If value is nil, the artifact will be removed
|
5274
5269
|
*
|
5275
5270
|
* @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`
|
5271
|
+
* @param value [String, nil] the value to which to set the artifact
|
5272
|
+
* @return [String, nil] the given `value`
|
5278
5273
|
*/
|
5279
5274
|
VALUE
|
5280
5275
|
Image_define(VALUE self, VALUE artifact, VALUE value)
|
@@ -5311,7 +5306,7 @@ Image_define(VALUE self, VALUE artifact, VALUE value)
|
|
5311
5306
|
* sequence. The default number of ticks is 0. By default there are 100 ticks per second but this
|
5312
5307
|
* number can be changed via the ticks_per_second attribute.
|
5313
5308
|
*
|
5314
|
-
* @return [
|
5309
|
+
* @return [Integer] The current delay value.
|
5315
5310
|
*/
|
5316
5311
|
VALUE
|
5317
5312
|
Image_delay(VALUE self)
|
@@ -5399,7 +5394,7 @@ Image_delete_profile(VALUE self, VALUE name)
|
|
5399
5394
|
* - If all pixels have lower-order bytes equal to higher-order bytes, the depth will be reported as
|
5400
5395
|
* 8 even if the depth field in the Image structure says 16.
|
5401
5396
|
*
|
5402
|
-
* @return [
|
5397
|
+
* @return [Integer] the depth
|
5403
5398
|
*/
|
5404
5399
|
VALUE
|
5405
5400
|
Image_depth(VALUE self)
|
@@ -5425,9 +5420,9 @@ Image_depth(VALUE self)
|
|
5425
5420
|
* Straightens an image. A threshold of 40% works for most images.
|
5426
5421
|
*
|
5427
5422
|
* @overload deskew(threshold = 0.40, auto_crop_width = nil)
|
5428
|
-
* @param threshold [
|
5423
|
+
* @param threshold [Numeric, String] A percentage of QuantumRange. Either a Float between 0 and 1.0,
|
5429
5424
|
* inclusive, or a string in the form "NN%" where NN is between 0 and 100.
|
5430
|
-
* @param auto_crop_width [
|
5425
|
+
* @param auto_crop_width [Numeric] Specify a value for this argument to cause the deskewed image to
|
5431
5426
|
* be auto-cropped. The argument is the pixel width of the image background (e.g. 40).
|
5432
5427
|
* @return [Magick::Image] a new image
|
5433
5428
|
*/
|
@@ -5454,7 +5449,7 @@ Image_deskew(int argc, VALUE *argv, VALUE self)
|
|
5454
5449
|
case 0:
|
5455
5450
|
break;
|
5456
5451
|
default:
|
5457
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
5452
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 2)", argc);
|
5458
5453
|
break;
|
5459
5454
|
}
|
5460
5455
|
|
@@ -5583,7 +5578,7 @@ Image_difference(VALUE self, VALUE other)
|
|
5583
5578
|
/**
|
5584
5579
|
* Get image directory.
|
5585
5580
|
*
|
5586
|
-
* @return [String] the directory
|
5581
|
+
* @return [String, nil] the directory
|
5587
5582
|
*/
|
5588
5583
|
VALUE
|
5589
5584
|
Image_directory(VALUE self)
|
@@ -5599,8 +5594,8 @@ Image_directory(VALUE self)
|
|
5599
5594
|
* @overload displace(displacement_map, x_amp, y_amp = x_amp, gravity = Magick::NorthWestGravity, x_offset = 0, y_offset = 0)
|
5600
5595
|
* @param displacement_map [Magick::Image, Magick::ImageList] The source image for the composite
|
5601
5596
|
* operation. Either an imagelist or an image. If an imagelist, uses the current image.
|
5602
|
-
* @param x_amp [
|
5603
|
-
* @param y_amp [
|
5597
|
+
* @param x_amp [Numeric] The maximum displacement on the x-axis.
|
5598
|
+
* @param y_amp [Numeric] The maximum displacement on the y-axis.
|
5604
5599
|
* @param gravity [Magick::GravityType] the gravity for offset. the offsets are measured from the
|
5605
5600
|
* NorthWest corner by default.
|
5606
5601
|
* @param x_offset [Numeric] The offset that measured from the left-hand side of the target image.
|
@@ -5757,6 +5752,8 @@ Image_dispatch(int argc, VALUE *argv, VALUE self)
|
|
5757
5752
|
/**
|
5758
5753
|
* Display the image to an X window screen.
|
5759
5754
|
*
|
5755
|
+
* @yield [info]
|
5756
|
+
* @yieldparam info [Magick::Image::Info]
|
5760
5757
|
* @return [Magick::Image] self
|
5761
5758
|
*/
|
5762
5759
|
VALUE
|
@@ -5833,10 +5830,10 @@ Image_dispose_eq(VALUE self, VALUE dispose)
|
|
5833
5830
|
* @overload dissolve(overlay, src_percent, dst_percent = -1.0, gravity = Magick::NorthWestGravity, x_offset = 0, y_offset = 0)
|
5834
5831
|
* @param overlay [Magick::Image, Magick::ImageList] The source image for the composite operation.
|
5835
5832
|
* Either an imagelist or an image. If an imagelist, uses the current image.
|
5836
|
-
* @param src_percent [
|
5833
|
+
* @param src_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
5837
5834
|
* If src_percentage is a number it is interpreted as a percentage.
|
5838
5835
|
* Both 0.25 and "25%" mean 25%. This argument is required.
|
5839
|
-
* @param dst_percent [
|
5836
|
+
* @param dst_percent [Numeric, String] Either a non-negative number a string in the form "NN%".
|
5840
5837
|
* If src_percentage is a number it is interpreted as a percentage.
|
5841
5838
|
* Both 0.25 and "25%" mean 25%. This argument may omitted if no other arguments follow it.
|
5842
5839
|
* In this case the default is 100%-src_percentage.
|
@@ -5925,7 +5922,8 @@ Image_dissolve(int argc, VALUE *argv, VALUE self)
|
|
5925
5922
|
* image is adjusted to ensure the whole source image will just fit within the final destination
|
5926
5923
|
* image, which will be sized and offset accordingly. Also in many cases the virtual offset of
|
5927
5924
|
* the source image will be taken into account in the mapping.
|
5928
|
-
* @yield [
|
5925
|
+
* @yield [opt_args]
|
5926
|
+
* @yieldparam opt_args [Magick::OptionalMethodArguments]
|
5929
5927
|
*
|
5930
5928
|
* @return [Magick::Image] a new image
|
5931
5929
|
* @example
|
@@ -6191,7 +6189,7 @@ Image_each_profile(VALUE self)
|
|
6191
6189
|
* Find edges in an image. "radius" defines the radius of the convolution filter.
|
6192
6190
|
*
|
6193
6191
|
* @overload edge(radius = 0.0)
|
6194
|
-
* @param radius [
|
6192
|
+
* @param radius [Numeric] The radius of the convolution filter.
|
6195
6193
|
* @return [Magick::Image] a new image
|
6196
6194
|
*/
|
6197
6195
|
VALUE
|
@@ -6279,8 +6277,8 @@ effect_image(VALUE self, int argc, VALUE *argv, gvl_function_t fp)
|
|
6279
6277
|
* Adds a 3-dimensional effect.
|
6280
6278
|
*
|
6281
6279
|
* @overload emboss(radius = 0.0, sigma = 1.0)
|
6282
|
-
* @param radius [
|
6283
|
-
* @param sigma [
|
6280
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
6281
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
6284
6282
|
* @return [Magick::Image] a new image
|
6285
6283
|
*/
|
6286
6284
|
VALUE
|
@@ -6810,7 +6808,7 @@ Image_export_pixels_to_str(int argc, VALUE *argv, VALUE self)
|
|
6810
6808
|
case 0:
|
6811
6809
|
break;
|
6812
6810
|
default:
|
6813
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
6811
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 6)", argc);
|
6814
6812
|
break;
|
6815
6813
|
}
|
6816
6814
|
|
@@ -6920,7 +6918,7 @@ Image_filename(VALUE self)
|
|
6920
6918
|
/**
|
6921
6919
|
* Return the image file size.
|
6922
6920
|
*
|
6923
|
-
* @return [
|
6921
|
+
* @return [Integer] the file size
|
6924
6922
|
*/
|
6925
6923
|
VALUE Image_filesize(VALUE self)
|
6926
6924
|
{
|
@@ -7090,7 +7088,7 @@ Image_flip(VALUE self)
|
|
7090
7088
|
* Create a vertical mirror image by reflecting the pixels around the central x-axis.
|
7091
7089
|
* In-place form of {Image#flip}.
|
7092
7090
|
*
|
7093
|
-
* @return [Magick::Image]
|
7091
|
+
* @return [Magick::Image] self
|
7094
7092
|
* @see Image#flip
|
7095
7093
|
* @see Image#flop
|
7096
7094
|
* @see Image#flop!
|
@@ -7123,7 +7121,7 @@ Image_flop(VALUE self)
|
|
7123
7121
|
* Create a horizonal mirror image by reflecting the pixels around the central y-axis.
|
7124
7122
|
* In-place form of {Image#flop}.
|
7125
7123
|
*
|
7126
|
-
* @return [Magick::Image]
|
7124
|
+
* @return [Magick::Image] self
|
7127
7125
|
* @see Image#flop
|
7128
7126
|
* @see Image#flip
|
7129
7127
|
* @see Image#flip!
|
@@ -7273,7 +7271,8 @@ Image_frame(int argc, VALUE *argv, VALUE self)
|
|
7273
7271
|
* @overload from_blob(blob)
|
7274
7272
|
* This yields {Magick::Image::Info} to block with its object's scope.
|
7275
7273
|
* @param blob [String] the blob data
|
7276
|
-
* @yield [
|
7274
|
+
* @yield [info]
|
7275
|
+
* @yieldparam info [Magick::Image::Info]
|
7277
7276
|
*
|
7278
7277
|
* @return [Array<Magick::Image>] an array of new images
|
7279
7278
|
* @see Image#to_blob
|
@@ -7303,6 +7302,7 @@ Image_from_blob(VALUE klass ATTRIBUTE_UNUSED, VALUE blob_arg)
|
|
7303
7302
|
|
7304
7303
|
rm_ensure_result(images);
|
7305
7304
|
rm_set_user_artifact(images, info);
|
7305
|
+
rm_sync_image_options(images, info);
|
7306
7306
|
|
7307
7307
|
RB_GC_GUARD(info_obj);
|
7308
7308
|
|
@@ -7315,15 +7315,14 @@ Image_from_blob(VALUE klass ATTRIBUTE_UNUSED, VALUE blob_arg)
|
|
7315
7315
|
*
|
7316
7316
|
* @overload function_channel(function, *args, channel = Magick::AllChannels)
|
7317
7317
|
* @param function [Magick::MagickFunction] the function
|
7318
|
-
* @param *args [
|
7318
|
+
* @param *args [Numeric] One or more floating-point numbers.
|
7319
7319
|
* The number of parameters depends on the function. See the ImageMagick documentation for
|
7320
7320
|
* details.
|
7321
|
-
|
7322
7321
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
7323
7322
|
*
|
7324
7323
|
* @overload function_channel(function, *args, *channels)
|
7325
7324
|
* @param function [Magick::MagickFunction] the function
|
7326
|
-
* @param *args [
|
7325
|
+
* @param *args [Numeric] One or more floating-point numbers.
|
7327
7326
|
* The number of parameters depends on the function. See the ImageMagick documentation for
|
7328
7327
|
* details.
|
7329
7328
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
@@ -7429,9 +7428,9 @@ Image_fuzz(VALUE self)
|
|
7429
7428
|
/**
|
7430
7429
|
* Set the number of algorithms search for a target color.
|
7431
7430
|
*
|
7432
|
-
* @param fuzz [String,
|
7431
|
+
* @param fuzz [String, Numeric] The argument may be a floating-point numeric value or a string in the
|
7433
7432
|
* form "NN%".
|
7434
|
-
* @return [String,
|
7433
|
+
* @return [String, Numeric] the given value
|
7435
7434
|
* @see Info#fuzz=
|
7436
7435
|
*/
|
7437
7436
|
VALUE
|
@@ -7510,8 +7509,8 @@ Image_gamma(VALUE self)
|
|
7510
7509
|
/**
|
7511
7510
|
* Set the gamma level of the image.
|
7512
7511
|
*
|
7513
|
-
* @param val [
|
7514
|
-
* @return [
|
7512
|
+
* @param val [Numeric] the gamma level
|
7513
|
+
* @return [Numeric] the gamma level
|
7515
7514
|
*/
|
7516
7515
|
VALUE
|
7517
7516
|
Image_gamma_eq(VALUE self, VALUE val)
|
@@ -7524,12 +7523,12 @@ Image_gamma_eq(VALUE self, VALUE val)
|
|
7524
7523
|
* Apply gamma to a channel.
|
7525
7524
|
*
|
7526
7525
|
* @overload gamma_channel(gamma, channel = Magick::AllChannels)
|
7527
|
-
* @param Values gamma [
|
7526
|
+
* @param Values gamma [Numeric] typically range from 0.8 to 2.3. You can also reduce the influence
|
7528
7527
|
* of a particular channel with a gamma value of 0.
|
7529
7528
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
7530
7529
|
*
|
7531
7530
|
* @overload gamma_channel(gamma, *channels)
|
7532
|
-
* @param Values gamma [
|
7531
|
+
* @param Values gamma [Numeric] typically range from 0.8 to 2.3. You can also reduce the influence
|
7533
7532
|
* of a particular channel with a gamma value of 0.
|
7534
7533
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
7535
7534
|
*
|
@@ -7679,8 +7678,8 @@ Image_gamma_correct(int argc, VALUE *argv, VALUE self)
|
|
7679
7678
|
* Blur the image.
|
7680
7679
|
*
|
7681
7680
|
* @overload gaussian_blur(radius = 0.0, sigma = 1.0)
|
7682
|
-
* @param radius [
|
7683
|
-
* @param sigma [
|
7681
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
7682
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
7684
7683
|
* @return [Magick::Image] a new image
|
7685
7684
|
*/
|
7686
7685
|
VALUE
|
@@ -7694,13 +7693,13 @@ Image_gaussian_blur(int argc, VALUE *argv, VALUE self)
|
|
7694
7693
|
* Blur the image on a channel.
|
7695
7694
|
*
|
7696
7695
|
* @overload gaussian_blur_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
7697
|
-
* @param radius [
|
7698
|
-
* @param sigma [
|
7696
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
7697
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
7699
7698
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
7700
7699
|
*
|
7701
7700
|
* @overload gaussian_blur_channel(radius = 0.0, sigma = 1.0, *channels)
|
7702
|
-
* @param radius [
|
7703
|
-
* @param sigma [
|
7701
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
7702
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
7704
7703
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
7705
7704
|
*
|
7706
7705
|
* @return [Magick::Image] a new image
|
@@ -7767,8 +7766,8 @@ Image_geometry(VALUE self)
|
|
7767
7766
|
/**
|
7768
7767
|
* Set the preferred size of the image when encoding.
|
7769
7768
|
*
|
7770
|
-
* @param geometry [String] the geometry
|
7771
|
-
* @return [String] the given geometry
|
7769
|
+
* @param geometry [Magick::Geometry, String] the geometry
|
7770
|
+
* @return [Magick::Geometry, String] the given geometry
|
7772
7771
|
* @see https://www.imagemagick.org/Magick++/Geometry.html
|
7773
7772
|
*/
|
7774
7773
|
VALUE
|
@@ -7960,26 +7959,7 @@ Image_gray_q(VALUE self)
|
|
7960
7959
|
#if defined(HAVE_SETIMAGEGRAY)
|
7961
7960
|
return has_attribute(self, (MagickBooleanType (*)(const Image *, ExceptionInfo *))SetImageGray);
|
7962
7961
|
#else
|
7963
|
-
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
7964
7962
|
return has_attribute(self, IsGrayImage);
|
7965
|
-
#else
|
7966
|
-
// For ImageMagick 6.7
|
7967
|
-
Image *image;
|
7968
|
-
ColorspaceType colorspace;
|
7969
|
-
VALUE ret;
|
7970
|
-
|
7971
|
-
image = rm_check_destroyed(self);
|
7972
|
-
colorspace = image->colorspace;
|
7973
|
-
if (image->colorspace == sRGBColorspace || image->colorspace == TransparentColorspace) {
|
7974
|
-
// Workaround
|
7975
|
-
// If image colorspace has non-RGBColorspace, IsGrayImage() always return false.
|
7976
|
-
image->colorspace = RGBColorspace;
|
7977
|
-
}
|
7978
|
-
|
7979
|
-
ret = has_attribute(self, IsGrayImage);
|
7980
|
-
image->colorspace = colorspace;
|
7981
|
-
return ret;
|
7982
|
-
#endif
|
7983
7963
|
#endif
|
7984
7964
|
}
|
7985
7965
|
|
@@ -8000,6 +7980,8 @@ Image_histogram_q(VALUE self)
|
|
8000
7980
|
* Implode the image by the specified percentage.
|
8001
7981
|
*
|
8002
7982
|
* @overload implode(amount = 0.50)
|
7983
|
+
* @param amount [Numeric] Increasing the absolute value of the argument increases the effect.
|
7984
|
+
* The value may be positive for implosion, or negative for explosion. The default is 0.50.
|
8003
7985
|
* @return [Magick::Image] a new image
|
8004
7986
|
*/
|
8005
7987
|
VALUE
|
@@ -8466,8 +8448,8 @@ Image_iptc_profile(VALUE self)
|
|
8466
8448
|
/**
|
8467
8449
|
* Set the IPTC profile. The argument is a string.
|
8468
8450
|
*
|
8469
|
-
* @param profile [String] the IPTC profile
|
8470
|
-
* @return [String] the given profile
|
8451
|
+
* @param profile [String, nil] the IPTC profile
|
8452
|
+
* @return [String, nil] the given profile
|
8471
8453
|
*/
|
8472
8454
|
VALUE
|
8473
8455
|
Image_iptc_profile_eq(VALUE self, VALUE profile)
|
@@ -8502,9 +8484,9 @@ Image_iterations_eq(VALUE self, VALUE val)
|
|
8502
8484
|
* points to the full available quantum range.
|
8503
8485
|
*
|
8504
8486
|
* @overload level2(black_point = 0.0, white_point = Magick::QuantumRange, gamma = 1.0)
|
8505
|
-
* @param black_point [
|
8506
|
-
* @param white_point [
|
8507
|
-
* @param gamma [
|
8487
|
+
* @param black_point [Numeric] A black point level in the range 0 - QuantumRange.
|
8488
|
+
* @param white_point [Numeric] A white point level in the range 0..QuantumRange.
|
8489
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8508
8490
|
* @return [Magick::Image] a new image
|
8509
8491
|
*/
|
8510
8492
|
VALUE
|
@@ -8565,9 +8547,9 @@ Image_level2(int argc, VALUE *argv, VALUE self)
|
|
8565
8547
|
*
|
8566
8548
|
* @overload level_channel(aChannelType, black = 0.0, white = 1.0, gamma = Magick::QuantumRange)
|
8567
8549
|
* @param aChannelType [Magick::ChannelType] A ChannelType value.
|
8568
|
-
* @param black [
|
8569
|
-
* @param white [
|
8570
|
-
* @param gamma [
|
8550
|
+
* @param black [Numeric] A black point level in the range 0..QuantumRange.
|
8551
|
+
* @param white [Numeric] A white point level in the range 0..QuantumRange.
|
8552
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8571
8553
|
* @return [Magick::Image] a new image
|
8572
8554
|
* @see Image#level2
|
8573
8555
|
*/
|
@@ -8720,14 +8702,15 @@ Image_level_colors(int argc, VALUE *argv, VALUE self)
|
|
8720
8702
|
* Maps black and white to the specified points. The reverse of {Image#level_channel}.
|
8721
8703
|
*
|
8722
8704
|
* @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 [
|
8705
|
+
* @param black [Numeric] A black point level in the range 0..QuantumRange.
|
8706
|
+
* @param white [Numeric] A white point level in the range 0..QuantumRange.
|
8707
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8708
|
+
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
8726
8709
|
*
|
8727
8710
|
* @overload levelize_channel(black_point, white_point = Magick::QuantumRange - black_point, gamma = 1.0, *channels)
|
8728
|
-
* @param black [
|
8729
|
-
* @param white [
|
8730
|
-
* @param gamma [
|
8711
|
+
* @param black [Numeric] A black point level in the range 0..QuantumRange.
|
8712
|
+
* @param white [Numeric] A white point level in the range 0..QuantumRange.
|
8713
|
+
* @param gamma [Numeric] A gamma correction in the range 0.0 - 10.0.
|
8731
8714
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
8732
8715
|
*
|
8733
8716
|
* @return [Magick::Image] a new image
|
@@ -8798,10 +8781,10 @@ Image_levelize_channel(int argc, VALUE *argv, VALUE self)
|
|
8798
8781
|
* Linear with saturation stretch.
|
8799
8782
|
*
|
8800
8783
|
* @overload linear_stretch(black_point, white_point = pixels - black_point)
|
8801
|
-
* @param black_point [
|
8784
|
+
* @param black_point [Numeric, String] black out at most this many pixels.
|
8802
8785
|
* Specify an absolute number of pixels as a numeric value, or a percentage as a string in the
|
8803
8786
|
* form 'NN%'.
|
8804
|
-
* @param white_point [
|
8787
|
+
* @param white_point [Numeric, String] burn at most this many pixels.
|
8805
8788
|
* Specify an absolute number of pixels as a numeric value, or a percentage as a string in the
|
8806
8789
|
* form 'NN%'.
|
8807
8790
|
* This argument is optional. If not specified the default is `(columns * rows) - black_point`.
|
@@ -8844,8 +8827,8 @@ Image_linear_stretch(int argc, VALUE *argv, VALUE self)
|
|
8844
8827
|
* @param columns [Numeric] The desired width height. Should not exceed 200% of the original
|
8845
8828
|
* dimension.
|
8846
8829
|
* @param rows [Numeric] The desired height. Should not exceed 200% of the original dimension.
|
8847
|
-
* @param delta_x [
|
8848
|
-
* @param rigidity [
|
8830
|
+
* @param delta_x [Numeric] Maximum seam transversal step (0 means straight seams).
|
8831
|
+
* @param rigidity [Numeric] Introduce a bias for non-straight seams (typically 0).
|
8849
8832
|
* @return [Magick::Image] a new image
|
8850
8833
|
*/
|
8851
8834
|
VALUE
|
@@ -9304,7 +9287,7 @@ set_image_mask(Image *image, VALUE mask)
|
|
9304
9287
|
* @param image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
9305
9288
|
* imagelist, uses the current image.
|
9306
9289
|
*
|
9307
|
-
* @return [Magick::Image] the mask image
|
9290
|
+
* @return [Magick::Image, nil] the mask image
|
9308
9291
|
*/
|
9309
9292
|
VALUE
|
9310
9293
|
Image_mask(int argc, VALUE *argv, VALUE self)
|
@@ -9576,9 +9559,12 @@ Image_minify_bang(VALUE self)
|
|
9576
9559
|
* Changes the brightness, saturation, and hue.
|
9577
9560
|
*
|
9578
9561
|
* @overload modulate(brightness = 1.0, saturation = 1.0, hue = 1.0)
|
9579
|
-
* @param brightness [
|
9580
|
-
*
|
9581
|
-
* @param
|
9562
|
+
* @param brightness [Numeric, String] The percent change in the brightness.
|
9563
|
+
* Must be a non-negative number or a string in the form "NN%".
|
9564
|
+
* @param saturation [Numeric, String] The percent change in the saturation.
|
9565
|
+
* Must be a number or a string in the form "NN%".
|
9566
|
+
* @param hue [Numeric, String] The percent change in the hue.
|
9567
|
+
* Must be a number or a string in the form "NN%".
|
9582
9568
|
* @return [Magick::Image] a new image
|
9583
9569
|
*/
|
9584
9570
|
VALUE
|
@@ -9597,11 +9583,11 @@ Image_modulate(int argc, VALUE *argv, VALUE self)
|
|
9597
9583
|
switch (argc)
|
9598
9584
|
{
|
9599
9585
|
case 3:
|
9600
|
-
pct_hue =
|
9586
|
+
pct_hue = rm_percentage2(argv[2], 1.0, false) * 100.0;
|
9601
9587
|
case 2:
|
9602
|
-
pct_saturation =
|
9588
|
+
pct_saturation = rm_percentage2(argv[1], 1.0, false) * 100.0;
|
9603
9589
|
case 1:
|
9604
|
-
pct_brightness =
|
9590
|
+
pct_brightness = rm_percentage(argv[0], 1.0) * 100.0;
|
9605
9591
|
break;
|
9606
9592
|
case 0:
|
9607
9593
|
break;
|
@@ -9654,7 +9640,7 @@ Image_monochrome_q(VALUE self)
|
|
9654
9640
|
/**
|
9655
9641
|
* Tile size and offset within an image montage. Only valid for montage images.
|
9656
9642
|
*
|
9657
|
-
* @return [String] the tile size and offset
|
9643
|
+
* @return [String, nil] the tile size and offset
|
9658
9644
|
*/
|
9659
9645
|
VALUE
|
9660
9646
|
Image_montage(VALUE self)
|
@@ -9699,7 +9685,7 @@ motion_blur(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
9699
9685
|
case 0:
|
9700
9686
|
break;
|
9701
9687
|
default:
|
9702
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
9688
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 3)", argc);
|
9703
9689
|
break;
|
9704
9690
|
}
|
9705
9691
|
|
@@ -9727,9 +9713,9 @@ motion_blur(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
9727
9713
|
* blurring motion.
|
9728
9714
|
*
|
9729
9715
|
* @overload motion_blur(radius = 0.0, sigma = 1.0, angle = 0.0)
|
9730
|
-
* @param radius [
|
9731
|
-
* @param sigma [
|
9732
|
-
* @param angle [
|
9716
|
+
* @param radius [Numeric] The radius
|
9717
|
+
* @param sigma [Numeric] The standard deviation
|
9718
|
+
* @param angle [Numeric] The angle (in degrees)
|
9733
9719
|
* @return [Magick::Image] a new image
|
9734
9720
|
*/
|
9735
9721
|
VALUE
|
@@ -9797,7 +9783,6 @@ Image_negate(int argc, VALUE *argv, VALUE self)
|
|
9797
9783
|
* @overload negate_channel(grayscale = false, *channels)
|
9798
9784
|
* @param grayscale [Boolean] If the grayscale argument is true, only the grayscale values are
|
9799
9785
|
* negated.
|
9800
|
-
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
9801
9786
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
9802
9787
|
*
|
9803
9788
|
* @return [Magick::Image] a new image
|
@@ -9923,6 +9908,8 @@ Image_initialize(int argc, VALUE *argv, VALUE self)
|
|
9923
9908
|
CALL_FUNC_WITHOUT_GVL(GVL_FUNC(SetImageExtent), &args);
|
9924
9909
|
#endif
|
9925
9910
|
|
9911
|
+
rm_sync_image_options(image, info);
|
9912
|
+
|
9926
9913
|
// If the caller did not supply a fill argument, call SetImageBackgroundColor
|
9927
9914
|
// to fill the image using the background color. The background color can
|
9928
9915
|
// be set by specifying it when creating the Info parm block.
|
@@ -10012,7 +9999,11 @@ Image_normalize(VALUE self)
|
|
10012
9999
|
*
|
10013
10000
|
* @overload normalize_channel(channel = Magick::AllChannels)
|
10014
10001
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
10015
|
-
*
|
10002
|
+
*
|
10003
|
+
* @overload normalize_channel(*channels)
|
10004
|
+
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
10005
|
+
*
|
10006
|
+
* @return [Magick::Image] a new image
|
10016
10007
|
*/
|
10017
10008
|
VALUE
|
10018
10009
|
Image_normalize_channel(int argc, VALUE *argv, VALUE self)
|
@@ -10077,7 +10068,7 @@ Image_normalized_maximum_error(VALUE self)
|
|
10077
10068
|
/**
|
10078
10069
|
* Return the number of unique colors in the image.
|
10079
10070
|
*
|
10080
|
-
* @return [
|
10071
|
+
* @return [Integer] number of unique colors
|
10081
10072
|
*/
|
10082
10073
|
VALUE
|
10083
10074
|
Image_number_colors(VALUE self)
|
@@ -10102,7 +10093,7 @@ Image_number_colors(VALUE self)
|
|
10102
10093
|
/**
|
10103
10094
|
* Get the number of bytes to skip over when reading raw image.
|
10104
10095
|
*
|
10105
|
-
* @return [
|
10096
|
+
* @return [Integer] the offset
|
10106
10097
|
*/
|
10107
10098
|
VALUE
|
10108
10099
|
Image_offset(VALUE self)
|
@@ -10113,8 +10104,8 @@ Image_offset(VALUE self)
|
|
10113
10104
|
/**
|
10114
10105
|
* Set the number of bytes to skip over when reading raw image.
|
10115
10106
|
*
|
10116
|
-
* @param val [
|
10117
|
-
* @return [
|
10107
|
+
* @param val [Numeric] the offset
|
10108
|
+
* @return [Numeric] the given offset
|
10118
10109
|
*/
|
10119
10110
|
VALUE
|
10120
10111
|
Image_offset_eq(VALUE self, VALUE val)
|
@@ -10127,7 +10118,7 @@ Image_offset_eq(VALUE self, VALUE val)
|
|
10127
10118
|
* Apply a special effect filter that simulates an oil painting.
|
10128
10119
|
*
|
10129
10120
|
* @overload oil_paint(radius = 3.0)
|
10130
|
-
* @param radius [
|
10121
|
+
* @param radius [Numeric] The radius of the Gaussian in pixels.
|
10131
10122
|
* @return [Magick::Image] a new image
|
10132
10123
|
*/
|
10133
10124
|
VALUE
|
@@ -10232,7 +10223,7 @@ Image_opaque(VALUE self, VALUE target, VALUE fill)
|
|
10232
10223
|
* @param fill [Magick::Pixel, String] the color for filling
|
10233
10224
|
* @param invert [Boolean] If true, the target pixels are all the pixels that are not the target
|
10234
10225
|
* color. The default is the value of the target image's fuzz attribute
|
10235
|
-
* @param fuzz [
|
10226
|
+
* @param fuzz [Numeric] Colors within this distance are considered equal to the target color.
|
10236
10227
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
10237
10228
|
*
|
10238
10229
|
* @overload opaque_channel(target, fill, invert, fuzz, *channels)
|
@@ -10240,7 +10231,7 @@ Image_opaque(VALUE self, VALUE target, VALUE fill)
|
|
10240
10231
|
* @param fill [Magick::Pixel, String] the color for filling
|
10241
10232
|
* @param invert [Boolean] If true, the target pixels are all the pixels that are not the target
|
10242
10233
|
* color. The default is the value of the target image's fuzz attribute
|
10243
|
-
* @param fuzz [
|
10234
|
+
* @param fuzz [Numeric] Colors within this distance are considered equal to the target color.
|
10244
10235
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
10245
10236
|
*
|
10246
10237
|
* @return [Magick::Image] a new image
|
@@ -10464,11 +10455,11 @@ Image_page_eq(VALUE self, VALUE rect)
|
|
10464
10455
|
* Changes the opacity value of all the pixels that match color to the value specified by opacity.
|
10465
10456
|
* If invert is true, changes the pixels that don't match color.
|
10466
10457
|
*
|
10467
|
-
* @overload paint_transparent(
|
10468
|
-
* @param
|
10458
|
+
* @overload paint_transparent(color, invert, fuzz, alpha: Magick::TransparentAlpha)
|
10459
|
+
* @param color [Magick::Pixel, String] the color name
|
10469
10460
|
* @param invert [Boolean] If true, the target pixels are all the pixels that are not the target
|
10470
10461
|
* color.
|
10471
|
-
* @param fuzz [
|
10462
|
+
* @param fuzz [Numeric] By default the pixel must match exactly, but you can specify a tolerance
|
10472
10463
|
* level by passing a positive value.
|
10473
10464
|
* @param alpha [Numeric] The new alpha value, either an alpha value or a number between 0 and
|
10474
10465
|
* QuantumRange. The default is TransparentAlpha.
|
@@ -10576,6 +10567,9 @@ Image_palette_q(VALUE self)
|
|
10576
10567
|
/**
|
10577
10568
|
* Returns all the properties of an image or image sequence except for the pixels.
|
10578
10569
|
*
|
10570
|
+
* @param file_arg [File, String] the file containing image data or file name
|
10571
|
+
* @yield [info]
|
10572
|
+
* @yieldparam info [Magick::Image::Info]
|
10579
10573
|
* @return [Array<Magick::Image>] an array of 1 or more new image objects (without pixel data)
|
10580
10574
|
* @see Image#read
|
10581
10575
|
*/
|
@@ -10656,11 +10650,11 @@ Image_pixel_color(int argc, VALUE *argv, VALUE self)
|
|
10656
10650
|
DestroyExceptionInfo(exception);
|
10657
10651
|
|
10658
10652
|
#if defined(IMAGEMAGICK_7)
|
10659
|
-
old_color.red = GetPixelRed(image, old_pixel);
|
10660
|
-
old_color.green = GetPixelGreen(image, old_pixel);
|
10661
|
-
old_color.blue = GetPixelBlue(image, old_pixel);
|
10662
|
-
old_color.alpha = GetPixelAlpha(image, old_pixel);
|
10663
|
-
old_color.black = GetPixelBlack(image, old_pixel);
|
10653
|
+
old_color.red = GetPixelRed(image, old_pixel) + 0.5;
|
10654
|
+
old_color.green = GetPixelGreen(image, old_pixel) + 0.5;
|
10655
|
+
old_color.blue = GetPixelBlue(image, old_pixel) + 0.5;
|
10656
|
+
old_color.alpha = GetPixelAlpha(image, old_pixel) + 0.5;
|
10657
|
+
old_color.black = GetPixelBlack(image, old_pixel) + 0.5;
|
10664
10658
|
return Pixel_from_PixelPacket(&old_color);
|
10665
10659
|
#else
|
10666
10660
|
old_color = *old_pixel;
|
@@ -10735,11 +10729,11 @@ Image_pixel_color(int argc, VALUE *argv, VALUE self)
|
|
10735
10729
|
if (pixel)
|
10736
10730
|
{
|
10737
10731
|
#if defined(IMAGEMAGICK_7)
|
10738
|
-
old_color.red = GetPixelRed(image, pixel);
|
10739
|
-
old_color.green = GetPixelGreen(image, pixel);
|
10740
|
-
old_color.blue = GetPixelBlue(image, pixel);
|
10741
|
-
old_color.alpha = GetPixelAlpha(image, pixel);
|
10742
|
-
old_color.black = GetPixelBlack(image, pixel);
|
10732
|
+
old_color.red = GetPixelRed(image, pixel) + 0.5;
|
10733
|
+
old_color.green = GetPixelGreen(image, pixel) + 0.5;
|
10734
|
+
old_color.blue = GetPixelBlue(image, pixel) + 0.5;
|
10735
|
+
old_color.alpha = GetPixelAlpha(image, pixel) + 0.5;
|
10736
|
+
old_color.black = GetPixelBlack(image, pixel) + 0.5;
|
10743
10737
|
|
10744
10738
|
SetPixelRed(image, new_color.red, pixel);
|
10745
10739
|
SetPixelGreen(image, new_color.green, pixel);
|
@@ -10814,7 +10808,7 @@ Image_pixel_interpolation_method_eq(VALUE self, VALUE method)
|
|
10814
10808
|
* font_weight, gravity, pointsize, stroke, stroke_width, text_antialias, undercolor.
|
10815
10809
|
*
|
10816
10810
|
* @overload polaroid(angle = -5.0)
|
10817
|
-
* @param angle [
|
10811
|
+
* @param angle [Numeric] The resulting image is rotated by this amount, measured in degrees.
|
10818
10812
|
*
|
10819
10813
|
* @overload polaroid(angle = -5.0)
|
10820
10814
|
* If present a block, optional arguments may be specified in a block associated with the method.
|
@@ -10823,8 +10817,9 @@ Image_pixel_interpolation_method_eq(VALUE self, VALUE method)
|
|
10823
10817
|
* use options.shadow_color.
|
10824
10818
|
* To specify a different border color (that is, the color of the image border) use options.border_color.
|
10825
10819
|
* Both of these methods accept either a color name or a Pixel argument.
|
10826
|
-
* @param angle [
|
10827
|
-
* @yield [
|
10820
|
+
* @param angle [Numeric] The resulting image is rotated by this amount, measured in degrees.
|
10821
|
+
* @yield [opt]
|
10822
|
+
* @yieldparam opt [Magick::Image::PolaroidOptions]
|
10828
10823
|
*
|
10829
10824
|
* @return [Magick::Image] a new image
|
10830
10825
|
*/
|
@@ -10965,7 +10960,7 @@ Image_preview(VALUE self, VALUE preview)
|
|
10965
10960
|
* Set the image profile. If "profile" is nil, deletes the profile. Otherwise "profile" must be a
|
10966
10961
|
* string containing the specified profile.
|
10967
10962
|
*
|
10968
|
-
* @param name [String] The profile name, or "*" to represent all the profiles in the image.
|
10963
|
+
* @param name [String, nil] The profile name, or "*" to represent all the profiles in the image.
|
10969
10964
|
* @param profile [String] The profile value, or nil to cause the profile to be removed.
|
10970
10965
|
* @return [Magick::Image] self
|
10971
10966
|
*/
|
@@ -10988,7 +10983,7 @@ Image_profile_bang(VALUE self, VALUE name, VALUE profile)
|
|
10988
10983
|
/**
|
10989
10984
|
* Get image quality.
|
10990
10985
|
*
|
10991
|
-
* @return [
|
10986
|
+
* @return [Integer] the quality
|
10992
10987
|
*/
|
10993
10988
|
VALUE
|
10994
10989
|
Image_quality(VALUE self)
|
@@ -11000,7 +10995,7 @@ Image_quality(VALUE self)
|
|
11000
10995
|
/**
|
11001
10996
|
* Return the image depth to the nearest Quantum (8, 16, or 32).
|
11002
10997
|
*
|
11003
|
-
* @return [
|
10998
|
+
* @return [Integer] image depth
|
11004
10999
|
*/
|
11005
11000
|
VALUE
|
11006
11001
|
Image_quantum_depth(VALUE self)
|
@@ -11025,12 +11020,12 @@ Image_quantum_depth(VALUE self)
|
|
11025
11020
|
*
|
11026
11021
|
* @overload quantum_operator(quantum_expression_op, rvalue, channel = Magick::AllChannels)
|
11027
11022
|
* @param quantum_expression_op [Magick::QuantumExpressionOperator] the operator
|
11028
|
-
* @param rvalue [
|
11023
|
+
* @param rvalue [Numeric] the operation rvalue.
|
11029
11024
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
11030
11025
|
*
|
11031
11026
|
* @overload quantum_operator(quantum_expression_op, rvalue, *channels)
|
11032
11027
|
* @param quantum_expression_op [Magick::QuantumExpressionOperator] the operator
|
11033
|
-
* @param rvalue [
|
11028
|
+
* @param rvalue [Numeric] the operation rvalue.
|
11034
11029
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
11035
11030
|
*
|
11036
11031
|
* @return [Magick::Image] self
|
@@ -11169,11 +11164,9 @@ Image_quantum_operator(int argc, VALUE *argv, VALUE self)
|
|
11169
11164
|
case SumQuantumOperator:
|
11170
11165
|
qop = SumEvaluateOperator;
|
11171
11166
|
break;
|
11172
|
-
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
11173
11167
|
case RootMeanSquareQuantumOperator:
|
11174
11168
|
qop = RootMeanSquareEvaluateOperator;
|
11175
11169
|
break;
|
11176
|
-
#endif
|
11177
11170
|
}
|
11178
11171
|
|
11179
11172
|
exception = AcquireExceptionInfo();
|
@@ -11278,7 +11271,7 @@ Image_quantize(int argc, VALUE *argv, VALUE self)
|
|
11278
11271
|
/**
|
11279
11272
|
* Applies a radial blur to the image.
|
11280
11273
|
*
|
11281
|
-
* @param angle_obj [
|
11274
|
+
* @param angle_obj [Numeric] the angle (in degrees)
|
11282
11275
|
* @return [Magick::Image] a new image
|
11283
11276
|
*/
|
11284
11277
|
VALUE
|
@@ -11291,15 +11284,9 @@ Image_radial_blur(VALUE self, VALUE angle_obj)
|
|
11291
11284
|
image = rm_check_destroyed(self);
|
11292
11285
|
exception = AcquireExceptionInfo();
|
11293
11286
|
|
11294
|
-
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
11295
11287
|
GVL_STRUCT_TYPE(RotationalBlurImage) args = { image, angle, exception };
|
11296
11288
|
void *ret = CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RotationalBlurImage), &args);
|
11297
11289
|
new_image = reinterpret_cast<decltype(new_image)>(ret);
|
11298
|
-
#else
|
11299
|
-
GVL_STRUCT_TYPE(RadialBlurImage) args = { image, angle, exception };
|
11300
|
-
void *ret = CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RadialBlurImage), &args);
|
11301
|
-
new_image = reinterpret_cast<decltype(new_image)>(ret);
|
11302
|
-
#endif
|
11303
11290
|
rm_check_exception(exception, new_image, DestroyOnError);
|
11304
11291
|
DestroyExceptionInfo(exception);
|
11305
11292
|
|
@@ -11311,11 +11298,11 @@ Image_radial_blur(VALUE self, VALUE angle_obj)
|
|
11311
11298
|
* Applies a radial blur to the selected image channels.
|
11312
11299
|
*
|
11313
11300
|
* @overload radial_blur_channel(angle, channel = Magick::AllChannels)
|
11314
|
-
* @param angle [
|
11301
|
+
* @param angle [Numeric] the angle (in degrees)
|
11315
11302
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
11316
11303
|
*
|
11317
11304
|
* @overload radial_blur_channel(angle, *channels)
|
11318
|
-
* @param angle [
|
11305
|
+
* @param angle [Numeric] the angle (in degrees)
|
11319
11306
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
11320
11307
|
*
|
11321
11308
|
* @return [Magick::Image] a new image
|
@@ -11350,12 +11337,9 @@ Image_radial_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
11350
11337
|
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RotationalBlurImage), &args);
|
11351
11338
|
CHANGE_RESULT_CHANNEL_MASK(new_image);
|
11352
11339
|
END_CHANNEL_MASK(image);
|
11353
|
-
#
|
11340
|
+
#else
|
11354
11341
|
GVL_STRUCT_TYPE(RotationalBlurImageChannel) args = { image, channels, angle, exception };
|
11355
11342
|
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RotationalBlurImageChannel), &args);
|
11356
|
-
#else
|
11357
|
-
GVL_STRUCT_TYPE(RadialBlurImageChannel) args = { image, channels, angle, exception };
|
11358
|
-
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RadialBlurImageChannel), &args);
|
11359
11343
|
#endif
|
11360
11344
|
rm_check_exception(exception, new_image, DestroyOnError);
|
11361
11345
|
DestroyExceptionInfo(exception);
|
@@ -11369,11 +11353,11 @@ Image_radial_blur_channel(int argc, VALUE *argv, VALUE self)
|
|
11369
11353
|
* threshold. The result is a low-contrast, two color image.
|
11370
11354
|
*
|
11371
11355
|
* @overload random_threshold_channel(geometry_str, channel = Magick::AllChannels)
|
11372
|
-
* @param geometry_str [String] A geometry string containing LOWxHIGH thresholds.
|
11356
|
+
* @param geometry_str [Magick::Geometry, String] A geometry string containing LOWxHIGH thresholds.
|
11373
11357
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
11374
11358
|
*
|
11375
11359
|
* @overload random_threshold_channel(geometry_str, *channels)
|
11376
|
-
* @param geometry_str [String] A geometry string containing LOWxHIGH thresholds.
|
11360
|
+
* @param geometry_str [Magick::Geometry, String] A geometry string containing LOWxHIGH thresholds.
|
11377
11361
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
11378
11362
|
*
|
11379
11363
|
* @return [Magick::Image] a new image
|
@@ -11497,6 +11481,8 @@ Image_raise(int argc, VALUE *argv, VALUE self)
|
|
11497
11481
|
* Call ReadImage.
|
11498
11482
|
*
|
11499
11483
|
* @param file_arg [File, String] the file containing image data or file name
|
11484
|
+
* @yield [info]
|
11485
|
+
* @yieldparam info [Magick::Image::Info]
|
11500
11486
|
* @return [Array<Magick::Image>] an array of 1 or more new image objects
|
11501
11487
|
*/
|
11502
11488
|
VALUE
|
@@ -11612,9 +11598,11 @@ rd_image(VALUE klass ATTRIBUTE_UNUSED, VALUE file, gvl_function_t fp)
|
|
11612
11598
|
#endif
|
11613
11599
|
|
11614
11600
|
rm_check_exception(exception, images, DestroyOnError);
|
11615
|
-
rm_set_user_artifact(images, info);
|
11616
11601
|
DestroyExceptionInfo(exception);
|
11617
11602
|
|
11603
|
+
rm_set_user_artifact(images, info);
|
11604
|
+
rm_sync_image_options(images, info);
|
11605
|
+
|
11618
11606
|
RB_GC_GUARD(info_obj);
|
11619
11607
|
|
11620
11608
|
return array_from_images(images);
|
@@ -11626,7 +11614,7 @@ rd_image(VALUE klass ATTRIBUTE_UNUSED, VALUE file, gvl_function_t fp)
|
|
11626
11614
|
* sized matrices, typically you use a 5x5 for an RGBA image and a 6x6 for CMYKA. Populate the last
|
11627
11615
|
* row with normalized values to translate.
|
11628
11616
|
*
|
11629
|
-
* @param color_matrix [Array<
|
11617
|
+
* @param color_matrix [Array<Numeric>] An array of Float values representing the recolor matrix.
|
11630
11618
|
* @return [Magick::Image] a new image
|
11631
11619
|
*/
|
11632
11620
|
VALUE
|
@@ -11704,6 +11692,8 @@ Image_recolor(VALUE self, VALUE color_matrix)
|
|
11704
11692
|
* Read a Base64-encoded image.
|
11705
11693
|
*
|
11706
11694
|
* @param content [String] the content
|
11695
|
+
* @yield [info]
|
11696
|
+
* @yieldparam info [Magick::Image::Info]
|
11707
11697
|
* @return [Array<Magick::Image>] an array of new images
|
11708
11698
|
*/
|
11709
11699
|
VALUE
|
@@ -11754,9 +11744,10 @@ Image_read_inline(VALUE self ATTRIBUTE_UNUSED, VALUE content)
|
|
11754
11744
|
magick_free((void *)blob);
|
11755
11745
|
|
11756
11746
|
rm_check_exception(exception, images, DestroyOnError);
|
11757
|
-
|
11758
11747
|
DestroyExceptionInfo(exception);
|
11748
|
+
|
11759
11749
|
rm_set_user_artifact(images, info);
|
11750
|
+
rm_sync_image_options(images, info);
|
11760
11751
|
|
11761
11752
|
RB_GC_GUARD(info_obj);
|
11762
11753
|
|
@@ -12058,10 +12049,10 @@ resample(int bang, int argc, VALUE *argv, VALUE self)
|
|
12058
12049
|
* specifying the resample resolution.
|
12059
12050
|
*
|
12060
12051
|
* @overload resample(x_resolution = 72.0, y_resolution = 72.0, filter = self.filter, blur = self.blur)
|
12061
|
-
* @param x_resolution [
|
12062
|
-
* @param y_resolution [
|
12052
|
+
* @param x_resolution [Numeric] the target horizontal resolution.
|
12053
|
+
* @param y_resolution [Numeric] the target vertical resolution.
|
12063
12054
|
* @param filter [Magick::FilterType] the filter type
|
12064
|
-
* @param blur [
|
12055
|
+
* @param blur [Numeric] the blur size
|
12065
12056
|
* @return [Magick] a new image
|
12066
12057
|
* @see Image#resample!
|
12067
12058
|
*/
|
@@ -12078,10 +12069,10 @@ Image_resample(int argc, VALUE *argv, VALUE self)
|
|
12078
12069
|
* In-place form of {Image#resample}.
|
12079
12070
|
*
|
12080
12071
|
* @overload resample!(x_resolution = 72.0, y_resolution = 72.0, filter = self.filter, blur = self.blur)
|
12081
|
-
* @param x_resolution [
|
12082
|
-
* @param y_resolution [
|
12072
|
+
* @param x_resolution [Numeric] the target horizontal resolution.
|
12073
|
+
* @param y_resolution [Numeric] the target vertical resolution.
|
12083
12074
|
* @param filter [Magick::FilterType] the filter type
|
12084
|
-
* @param blur [
|
12075
|
+
* @param blur [Numeric] the blur size
|
12085
12076
|
* @return [Magick] a new image
|
12086
12077
|
* @see Image#resample
|
12087
12078
|
*/
|
@@ -12195,15 +12186,15 @@ resize(int bang, int argc, VALUE *argv, VALUE self)
|
|
12195
12186
|
* Scale an image to the desired dimensions using the specified filter and blur factor.
|
12196
12187
|
*
|
12197
12188
|
* @overload resize(scale)
|
12198
|
-
* @param scale [
|
12189
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12199
12190
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12200
12191
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12201
12192
|
*
|
12202
12193
|
* @overload resize(cols, rows, filter, blur)
|
12203
|
-
* @param cols [
|
12204
|
-
* @param rows [
|
12194
|
+
* @param cols [Numeric] The desired width
|
12195
|
+
* @param rows [Numeric] The desired height.
|
12205
12196
|
* @param filter [Magick::FilterType] the filter type
|
12206
|
-
* @param blur [
|
12197
|
+
* @param blur [Numeric] the blur size
|
12207
12198
|
*
|
12208
12199
|
* @return [Magick::Image] a new image
|
12209
12200
|
* @see Image#resize!
|
@@ -12221,15 +12212,15 @@ Image_resize(int argc, VALUE *argv, VALUE self)
|
|
12221
12212
|
* In-place form of {Image#resize}.
|
12222
12213
|
*
|
12223
12214
|
* @overload resize!(scale)
|
12224
|
-
* @param scale [
|
12215
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12225
12216
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12226
12217
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12227
12218
|
*
|
12228
12219
|
* @overload resize!(cols, rows, filter, blur)
|
12229
|
-
* @param cols [
|
12230
|
-
* @param rows [
|
12220
|
+
* @param cols [Numeric] The desired width
|
12221
|
+
* @param rows [Numeric] The desired height.
|
12231
12222
|
* @param filter [Magick::FilterType] the filter type
|
12232
|
-
* @param blur [
|
12223
|
+
* @param blur [Numeric] the blur size
|
12233
12224
|
*
|
12234
12225
|
* @return [Magick::Image] a new image
|
12235
12226
|
* @see Image#resize!
|
@@ -12342,10 +12333,10 @@ rotate(int bang, int argc, VALUE *argv, VALUE self)
|
|
12342
12333
|
* black.
|
12343
12334
|
*
|
12344
12335
|
* @overload rotate(degrees)
|
12345
|
-
* @param degrees [
|
12336
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12346
12337
|
*
|
12347
12338
|
* @overload rotate(degrees, qualifier)
|
12348
|
-
* @param degrees [
|
12339
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12349
12340
|
* @param qualifier [String] If present, either ">" or "<". If ">", rotates the image only if the
|
12350
12341
|
* image's width exceeds its height. If "<" rotates the image only if its height exceeds its
|
12351
12342
|
* width. If this argument is omitted the image is always rotated.
|
@@ -12366,10 +12357,10 @@ Image_rotate(int argc, VALUE *argv, VALUE self)
|
|
12366
12357
|
* In-place form of {Image#rotate}.
|
12367
12358
|
*
|
12368
12359
|
* @overload rotate!(degrees)
|
12369
|
-
* @param degrees [
|
12360
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12370
12361
|
*
|
12371
12362
|
* @overload rotate!(degrees, qualifier)
|
12372
|
-
* @param degrees [
|
12363
|
+
* @param degrees [Numeric] The number of degrees to rotate the image.
|
12373
12364
|
* @param qualifier [String] If present, either ">" or "<". If ">", rotates the image only if the
|
12374
12365
|
* image's width exceeds its height. If "<" rotates the image only if its height exceeds its
|
12375
12366
|
* width. If this argument is omitted the image is always rotated.
|
@@ -12388,7 +12379,7 @@ Image_rotate_bang(int argc, VALUE *argv, VALUE self)
|
|
12388
12379
|
/**
|
12389
12380
|
* Return image rows.
|
12390
12381
|
*
|
12391
|
-
* @return [
|
12382
|
+
* @return [Integer] the image rows
|
12392
12383
|
*/
|
12393
12384
|
VALUE
|
12394
12385
|
Image_rows(VALUE self)
|
@@ -12402,7 +12393,7 @@ Image_rows(VALUE self)
|
|
12402
12393
|
* method does not introduce any additional color into the scaled image.
|
12403
12394
|
*
|
12404
12395
|
* @overload sample(scale)
|
12405
|
-
* @param scale [
|
12396
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12406
12397
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12407
12398
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12408
12399
|
*
|
@@ -12426,7 +12417,7 @@ Image_sample(int argc, VALUE *argv, VALUE self)
|
|
12426
12417
|
* In-place form of {Image#sample}.
|
12427
12418
|
*
|
12428
12419
|
* @overload sample!(scale)
|
12429
|
-
* @param scale [
|
12420
|
+
* @param scale [Numeric] You can use this argument instead of specifying the desired width and
|
12430
12421
|
* height. The percentage size change. For example, 1.25 makes the new image 125% of the size of
|
12431
12422
|
* the receiver. The scale factor 0.5 makes the new image 50% of the size of the receiver.
|
12432
12423
|
*
|
@@ -12578,7 +12569,7 @@ scale(int bang, int argc, VALUE *argv, VALUE self, gvl_function_t fp)
|
|
12578
12569
|
* Return the scene number assigned to the image the last time the image was written to a
|
12579
12570
|
* multi-image image file.
|
12580
12571
|
*
|
12581
|
-
* @return [
|
12572
|
+
* @return [Integer] the image scene
|
12582
12573
|
*/
|
12583
12574
|
VALUE
|
12584
12575
|
Image_scene(VALUE self)
|
@@ -12591,16 +12582,16 @@ Image_scene(VALUE self)
|
|
12591
12582
|
* Selectively blur pixels within a contrast threshold.
|
12592
12583
|
*
|
12593
12584
|
* @overload selective_blur_channel(radius, sigma, threshold, channel = Magick::AllChannels)
|
12594
|
-
* @param radius [
|
12595
|
-
* @param sigma [
|
12596
|
-
* @param threshold [
|
12585
|
+
* @param radius [Numeric] the radius value
|
12586
|
+
* @param sigma [Numeric] the sigma value
|
12587
|
+
* @param threshold [Numeric, String] Either a number between 0.0 and 1.0 or a string in the form
|
12597
12588
|
* "NN%"
|
12598
12589
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
12599
12590
|
*
|
12600
12591
|
* @overload selective_blur_channel(radius, sigma, threshold, *channels)
|
12601
|
-
* @param radius [
|
12602
|
-
* @param sigma [
|
12603
|
-
* @param threshold [
|
12592
|
+
* @param radius [Numeric] the radius value
|
12593
|
+
* @param sigma [Numeric] the sigma value
|
12594
|
+
* @param threshold [Numeric, String] Either a number between 0.0 and 1.0 or a string in the form
|
12604
12595
|
* "NN%"
|
12605
12596
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
12606
12597
|
*
|
@@ -12739,7 +12730,7 @@ Image_separate(int argc, VALUE *argv, VALUE self)
|
|
12739
12730
|
* sepia toning.
|
12740
12731
|
*
|
12741
12732
|
* @overload sepiatone(threshold = Magick::QuantumRange)
|
12742
|
-
* @param threshold [
|
12733
|
+
* @param threshold [Numeric] Threshold ranges from 0 to QuantumRange and is a measure of the extent
|
12743
12734
|
* of the sepia toning. A threshold of 80% is a good starting point for a reasonable tone.
|
12744
12735
|
* @return [Magick::Image] a new image
|
12745
12736
|
*/
|
@@ -12781,9 +12772,9 @@ Image_sepiatone(int argc, VALUE *argv, VALUE self)
|
|
12781
12772
|
* @param colorspace [Magick::ColorspaceType] A ColorspaceType value. Empirical evidence suggests
|
12782
12773
|
* that distances in YUV or YIQ correspond to perceptual color differences more closely than do
|
12783
12774
|
* distances in RGB space. The image is then returned to RGB colorspace after color reduction.
|
12784
|
-
* @param cluster_threshold [
|
12775
|
+
* @param cluster_threshold [Numeric] The number of pixels in each cluster must exceed the the
|
12785
12776
|
* cluster threshold to be considered valid.
|
12786
|
-
* @param smoothing_threshold [
|
12777
|
+
* @param smoothing_threshold [Numeric] The smoothing threshold eliminates noise in the second
|
12787
12778
|
* derivative of the histogram. As the value is increased, you can expect a smoother second
|
12788
12779
|
* derivative.
|
12789
12780
|
* @param verbose [Boolean] If true, segment prints detailed information about the identified classes.
|
@@ -12844,10 +12835,12 @@ Image_segment(int argc, VALUE *argv, VALUE self)
|
|
12844
12835
|
* and the associated value is the property value.
|
12845
12836
|
*
|
12846
12837
|
* @overload properties
|
12847
|
-
* @return [Hash] the properties
|
12838
|
+
* @return [Hash<String, String>] the properties
|
12848
12839
|
*
|
12849
12840
|
* @overload properties
|
12850
|
-
* @yield [
|
12841
|
+
* @yield [property, value]
|
12842
|
+
* @yieldparam property [String] property key
|
12843
|
+
* @yieldparam value [String] property value
|
12851
12844
|
* @return [Magick::Image] self
|
12852
12845
|
*/
|
12853
12846
|
VALUE
|
@@ -12934,9 +12927,9 @@ Image_properties(VALUE self)
|
|
12934
12927
|
*
|
12935
12928
|
* @overload shade(shading = false, azimuth = 30.0, elevation = 30.0)
|
12936
12929
|
* @param shading [Boolean] If true, shade shades the intensity of each pixel.
|
12937
|
-
* @param azimuth [
|
12930
|
+
* @param azimuth [Numeric] The light source direction. The azimuth is measured in degrees. 0 is at
|
12938
12931
|
* 9 o'clock. Increasing values move the light source counter-clockwise.
|
12939
|
-
* @param elevation [
|
12932
|
+
* @param elevation [Numeric] The light source direction. The azimuth is measured in degrees. 0 is
|
12940
12933
|
* at 9 o'clock. Increasing values move the light source counter-clockwise.
|
12941
12934
|
* @return [Magick::Image] a new image
|
12942
12935
|
*/
|
@@ -12981,10 +12974,10 @@ Image_shade(int argc, VALUE *argv, VALUE self)
|
|
12981
12974
|
* @overload Image#shadow(x_offset = 4, y_offset = 4, sigma = 4.0, alpha = 1.0)
|
12982
12975
|
* @param x_offset [Numeric] The shadow x-offset
|
12983
12976
|
* @param y_offset [Numeric] The shadow y-offset
|
12984
|
-
* @param sigma [
|
12977
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator used to produce the
|
12985
12978
|
* shadow. The higher the number, the "blurrier" the shadow, but the longer it takes to produce
|
12986
12979
|
* the shadow. Must be > 0.0.
|
12987
|
-
* @param alpha [
|
12980
|
+
* @param alpha [Numeric, String] The percent alpha of the shadow. The argument may be a
|
12988
12981
|
* floating-point numeric value or a string in the form "NN%".
|
12989
12982
|
* @return [Magick::Image] a new image
|
12990
12983
|
*/
|
@@ -13037,8 +13030,8 @@ Image_shadow(int argc, VALUE *argv, VALUE self)
|
|
13037
13030
|
* Sharpen an image.
|
13038
13031
|
*
|
13039
13032
|
* @overload sharpen(radius = 0.0, sigma = 1.0)
|
13040
|
-
* @param radius [
|
13041
|
-
* @param sigma [
|
13033
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
13034
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
13042
13035
|
* @return [Magick::Image] a new image
|
13043
13036
|
*/
|
13044
13037
|
VALUE
|
@@ -13052,13 +13045,13 @@ Image_sharpen(int argc, VALUE *argv, VALUE self)
|
|
13052
13045
|
* Sharpen image on a channel.
|
13053
13046
|
*
|
13054
13047
|
* @overload sharpen_channel(radius = 0.0, sigma = 1.0, channel = Magick::AllChannels)
|
13055
|
-
* @param radius [
|
13056
|
-
* @param sigma [
|
13048
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
13049
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
13057
13050
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
13058
13051
|
*
|
13059
13052
|
* @overload sharpen_channel(radius = 0.0, sigma = 1.0, *channels)
|
13060
|
-
* @param radius [
|
13061
|
-
* @param sigma [
|
13053
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
13054
|
+
* @param sigma [Numeric] The sigma (standard deviation) of the Gaussian operator.
|
13062
13055
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
13063
13056
|
*
|
13064
13057
|
* @return [Magick::Image] a new image
|
@@ -13151,8 +13144,8 @@ Image_shave_bang(VALUE self, VALUE width, VALUE height)
|
|
13151
13144
|
* measured relative to the X axis. Empty triangles left over from shearing the image are filled
|
13152
13145
|
* with the background color.
|
13153
13146
|
*
|
13154
|
-
* @param x_shear [
|
13155
|
-
* @param y_shear [
|
13147
|
+
* @param x_shear [Numeric] the x shear (in degrees)
|
13148
|
+
* @param y_shear [Numeric] the y shear (in degrees)
|
13156
13149
|
* @return [Magick::Image] a new image
|
13157
13150
|
*/
|
13158
13151
|
VALUE
|
@@ -13181,10 +13174,9 @@ Image_shear(VALUE self, VALUE x_shear, VALUE y_shear)
|
|
13181
13174
|
* saturating highlights or shadows.
|
13182
13175
|
*
|
13183
13176
|
* @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
|
13177
|
+
* @param contrast [Numeric] indicates how much to increase the contrast
|
13186
13178
|
* (0 is none; 3 is typical; 20 is pushing it)
|
13187
|
-
* @param midpoint [
|
13179
|
+
* @param midpoint [Numeric] indicates where midtones fall in the resultant image (0 is white; 50%
|
13188
13180
|
* is middle-gray; 100% is black). Note that "50%" means "50% of the quantum range." This argument
|
13189
13181
|
* is a number between 0 and QuantumRange. To specify "50%" use QuantumRange * 0.50.
|
13190
13182
|
* @param sharpen [Boolean] Set sharpen to true to increase the image contrast otherwise the
|
@@ -13192,9 +13184,9 @@ Image_shear(VALUE self, VALUE x_shear, VALUE y_shear)
|
|
13192
13184
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
13193
13185
|
*
|
13194
13186
|
* @overload sigmoidal_contrast_channel(contrast = 3.0, midpoint = 50.0, sharpen = false, *channels)
|
13195
|
-
* @param contrast [
|
13187
|
+
* @param contrast [Numeric] indicates how much to increase the contrast
|
13196
13188
|
* (0 is none; 3 is typical; 20 is pushing it)
|
13197
|
-
* @param midpoint [
|
13189
|
+
* @param midpoint [Numeric] indicates where midtones fall in the resultant image (0 is white; 50%
|
13198
13190
|
* is middle-gray; 100% is black). Note that "50%" means "50% of the quantum range." This argument
|
13199
13191
|
* is a number between 0 and QuantumRange. To specify "50%" use QuantumRange * 0.50.
|
13200
13192
|
* @param sharpen [Boolean] Set sharpen to true to increase the image contrast otherwise the
|
@@ -13294,9 +13286,9 @@ Image_signature(VALUE self)
|
|
13294
13286
|
* Simulates a pencil sketch. For best results start with a grayscale image.
|
13295
13287
|
*
|
13296
13288
|
* @overload sketch(radius = 0.0, sigma = 1.0, angle = 0.0)
|
13297
|
-
* @param radius [
|
13298
|
-
* @param sigma [
|
13299
|
-
* @param angle [
|
13289
|
+
* @param radius [Numeric] The radius
|
13290
|
+
* @param sigma [Numeric] The standard deviation
|
13291
|
+
* @param angle [Numeric] The angle (in degrees)
|
13300
13292
|
* @return [Magick::Image] a new image
|
13301
13293
|
* @see motion_blur
|
13302
13294
|
*/
|
@@ -13314,7 +13306,7 @@ Image_sketch(int argc, VALUE *argv, VALUE self)
|
|
13314
13306
|
* QuantumRange and is a measure of the extent of the solarization.
|
13315
13307
|
*
|
13316
13308
|
* @overload solarize(threshold = 50.0)
|
13317
|
-
* @param threshold [
|
13309
|
+
* @param threshold [Numeric] Ranges from 0 to QuantumRange and is a measure of the extent of the
|
13318
13310
|
* solarization.
|
13319
13311
|
* @return a new image
|
13320
13312
|
*/
|
@@ -13657,7 +13649,7 @@ Image_splice(int argc, VALUE *argv, VALUE self)
|
|
13657
13649
|
* Randomly displace each pixel in a block defined by "radius".
|
13658
13650
|
*
|
13659
13651
|
* @overload spread(radius = 3.0)
|
13660
|
-
* @param radius [
|
13652
|
+
* @param radius [Numeric] The radius
|
13661
13653
|
* @return [Magick::Image] a new image
|
13662
13654
|
*/
|
13663
13655
|
VALUE
|
@@ -14031,7 +14023,7 @@ Image_strip_bang(VALUE self)
|
|
14031
14023
|
* through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to
|
14032
14024
|
* 360.
|
14033
14025
|
*
|
14034
|
-
* @param degrees_obj [
|
14026
|
+
* @param degrees_obj [Numeric] the degrees
|
14035
14027
|
* @return [Magick::Image] a new image
|
14036
14028
|
*/
|
14037
14029
|
VALUE
|
@@ -14164,7 +14156,7 @@ Image_texture_flood_fill(VALUE self, VALUE color_obj, VALUE texture_obj,
|
|
14164
14156
|
* Change the value of individual pixels based on the intensity of each pixel compared to
|
14165
14157
|
* threshold. The result is a high-contrast, two color image.
|
14166
14158
|
*
|
14167
|
-
* @param threshold_obj [
|
14159
|
+
* @param threshold_obj [Numeric] the threshold
|
14168
14160
|
* @return [Magick::Image] a new image
|
14169
14161
|
*/
|
14170
14162
|
VALUE
|
@@ -14353,11 +14345,12 @@ thumbnail(int bang, int argc, VALUE *argv, VALUE self)
|
|
14353
14345
|
* image is < 10% of the original.
|
14354
14346
|
*
|
14355
14347
|
* @overload thumbnail(scale)
|
14356
|
-
* @param scale [
|
14348
|
+
* @param scale [Numeric] The desired size represented as a floating-point number. For example, to
|
14357
14349
|
* make a thumbnail that is 9.5% of the size of the original image, use 0.095.
|
14358
14350
|
*
|
14359
14351
|
* @overload thumbnail(cols, rows)
|
14360
14352
|
* @param cols [Numeric] The desired width in pixels.
|
14353
|
+
* @param rows [Numeric] The desired height.
|
14361
14354
|
*
|
14362
14355
|
* @return [Magick::Image] a new image
|
14363
14356
|
* @see Image#thumbnail!
|
@@ -14375,11 +14368,12 @@ Image_thumbnail(int argc, VALUE *argv, VALUE self)
|
|
14375
14368
|
* image is < 10% of the original. In-place form of {Image#thumbnail}.
|
14376
14369
|
*
|
14377
14370
|
* @overload thumbnail!(scale)
|
14378
|
-
* @param scale [
|
14371
|
+
* @param scale [Numeric] The desired size represented as a floating-point number. For example, to
|
14379
14372
|
* make a thumbnail that is 9.5% of the size of the original image, use 0.095.
|
14380
14373
|
*
|
14381
14374
|
* @overload thumbnail!(cols, rows)
|
14382
14375
|
* @param cols [Numeric] The desired width in pixels.
|
14376
|
+
* @param rows [Numeric] The desired height.
|
14383
14377
|
*
|
14384
14378
|
* @return [Magick::Image] a new image
|
14385
14379
|
* @see Image#thumbnail
|
@@ -14397,7 +14391,7 @@ Image_thumbnail_bang(int argc, VALUE *argv, VALUE self)
|
|
14397
14391
|
* This attribute is used in conjunction with the delay attribute to establish the amount of time
|
14398
14392
|
* that must elapse between frames in an animation.The default is 100.
|
14399
14393
|
*
|
14400
|
-
* @return [
|
14394
|
+
* @return [Integer] ticks per second
|
14401
14395
|
*/
|
14402
14396
|
VALUE
|
14403
14397
|
Image_ticks_per_second(VALUE self)
|
@@ -14431,10 +14425,10 @@ Image_ticks_per_second_eq(VALUE self, VALUE tps)
|
|
14431
14425
|
*
|
14432
14426
|
* @overload tint(tint, red_alpha, green_alpha = red_alpha, blue_alpha = red_alpha, alpha_alpha = 1.0)
|
14433
14427
|
* @param tint [Magick::Pixel, String] the color name
|
14434
|
-
* @param red_alpha [
|
14435
|
-
* @param green_alpha [
|
14436
|
-
* @param blue_alpha [
|
14437
|
-
* @param alpha_alpha [
|
14428
|
+
* @param red_alpha [Numeric] the red value
|
14429
|
+
* @param green_alpha [Numeric] the green value
|
14430
|
+
* @param blue_alpha [Numeric] the blue value
|
14431
|
+
* @param alpha_alpha [Numeric] the alpha value
|
14438
14432
|
* @return a new image
|
14439
14433
|
*/
|
14440
14434
|
VALUE
|
@@ -14508,6 +14502,8 @@ Image_tint(int argc, VALUE *argv, VALUE self)
|
|
14508
14502
|
* - The magick member of the Image structure determines the format of the
|
14509
14503
|
* returned blob (GIG, JPEG, PNG, etc.)
|
14510
14504
|
*
|
14505
|
+
* @yield [info]
|
14506
|
+
* @yieldparam info [Magick::Image::Info]
|
14511
14507
|
* @return [String] the blob
|
14512
14508
|
* @see Image#from_blob
|
14513
14509
|
*/
|
@@ -14638,7 +14634,7 @@ Image_to_color(VALUE self, VALUE pixel_arg)
|
|
14638
14634
|
/**
|
14639
14635
|
* Alias for {Image#number_colors}.
|
14640
14636
|
*
|
14641
|
-
* @return [
|
14637
|
+
* @return [Integer] number of unique colors
|
14642
14638
|
* @see Image#number_colors
|
14643
14639
|
*/
|
14644
14640
|
VALUE
|
@@ -14871,7 +14867,7 @@ Image_transpose(VALUE self)
|
|
14871
14867
|
* rotating them by 90 degrees.
|
14872
14868
|
* In-place form of {Image#transpose}.
|
14873
14869
|
*
|
14874
|
-
* @return [Magick::Image]
|
14870
|
+
* @return [Magick::Image] self
|
14875
14871
|
* @see Image#transpose
|
14876
14872
|
*/
|
14877
14873
|
VALUE
|
@@ -14901,7 +14897,7 @@ Image_transverse(VALUE self)
|
|
14901
14897
|
* them by 270 degrees
|
14902
14898
|
* In-place form of {Image#transverse}.
|
14903
14899
|
*
|
14904
|
-
* @return [Magick::Image]
|
14900
|
+
* @return [Magick::Image] self
|
14905
14901
|
* @see Image#transverse
|
14906
14902
|
*/
|
14907
14903
|
VALUE
|
@@ -15001,7 +14997,7 @@ Image_trim(int argc, VALUE *argv, VALUE self)
|
|
15001
14997
|
* image. This may cause the image to appear to be surrounded by blank or black space when viewed
|
15002
14998
|
* with an external viewer. This only occurs when the image is saved in a format (such as GIF)
|
15003
14999
|
* that saves offset information. To reset the offset data, use true as the argument to trim.
|
15004
|
-
* @return [Magick::Image]
|
15000
|
+
* @return [Magick::Image] self
|
15005
15001
|
* @see Image#trim
|
15006
15002
|
*/
|
15007
15003
|
VALUE
|
@@ -15278,11 +15274,11 @@ unsharp_mask_args(int argc, VALUE *argv, double *radius, double *sigma,
|
|
15278
15274
|
* apply the diffence amount.
|
15279
15275
|
*
|
15280
15276
|
* @overload unsharp_mask(radius = 0.0, sigma = 1.0, amount = 1.0, threshold = 0.05)
|
15281
|
-
* @param radius [
|
15282
|
-
* @param sigma [
|
15283
|
-
* @param amount [
|
15277
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
15278
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator.
|
15279
|
+
* @param amount [Numeric] The percentage of the blurred image to be added to the receiver,
|
15284
15280
|
* specified as a fraction between 0 and 1.0
|
15285
|
-
* @param threshold [
|
15281
|
+
* @param threshold [Numeric] The threshold needed to apply the amount, specified as a fraction
|
15286
15282
|
* between 0 and 1.0
|
15287
15283
|
* @return [Magick::Image] a new image
|
15288
15284
|
*/
|
@@ -15315,20 +15311,20 @@ Image_unsharp_mask(int argc, VALUE *argv, VALUE self)
|
|
15315
15311
|
* Only the specified channels are sharpened.
|
15316
15312
|
*
|
15317
15313
|
* @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 [
|
15314
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
15315
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator.
|
15316
|
+
* @param amount [Numeric] The percentage of the blurred image to be added to the receiver,
|
15321
15317
|
* specified as a fraction between 0 and 1.0
|
15322
|
-
* @param threshold [
|
15318
|
+
* @param threshold [Numeric] The threshold needed to apply the amount, specified as a fraction
|
15323
15319
|
* between 0 and 1.0
|
15324
15320
|
* @param channel [Magick::ChannelType] a ChannelType arguments.
|
15325
15321
|
*
|
15326
15322
|
* @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 [
|
15323
|
+
* @param radius [Numeric] The radius of the Gaussian operator.
|
15324
|
+
* @param sigma [Numeric] The standard deviation of the Gaussian operator.
|
15325
|
+
* @param amount [Numeric] The percentage of the blurred image to be added to the receiver,
|
15330
15326
|
* specified as a fraction between 0 and 1.0
|
15331
|
-
* @param threshold [
|
15327
|
+
* @param threshold [Numeric] The threshold needed to apply the amount, specified as a fraction
|
15332
15328
|
* between 0 and 1.0
|
15333
15329
|
* @param *channels [Magick::ChannelType] one or more ChannelType arguments.
|
15334
15330
|
*
|
@@ -15373,10 +15369,10 @@ Image_unsharp_mask_channel(int argc, VALUE *argv, VALUE self)
|
|
15373
15369
|
* Soften the edges of an image.
|
15374
15370
|
*
|
15375
15371
|
* @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 [
|
15372
|
+
* @param horz_radius [Numeric] Influences the amount of background color in the horizontal dimension.
|
15373
|
+
* @param vert_radius [Numeric] Influences the amount of background color in the vertical dimension.
|
15374
|
+
* @param radius [Numeric] Controls the amount of blurring.
|
15375
|
+
* @param sigma [Numeric] Controls the amount of blurring.
|
15380
15376
|
* @return [Magick::Image] a new image
|
15381
15377
|
*/
|
15382
15378
|
VALUE
|
@@ -15478,11 +15474,11 @@ Image_virtual_pixel_method_eq(VALUE self, VALUE method)
|
|
15478
15474
|
* @overload watermark(mark, brightness = 1.0, saturation = 1.0, x_off = 0, y_off = 0)
|
15479
15475
|
* @param mark [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
15480
15476
|
* imagelist, uses the current image.
|
15481
|
-
* @param brightness [
|
15477
|
+
* @param brightness [Numeric, String] The fraction of the lightness component of the watermark pixels to be
|
15482
15478
|
* composited onto the target image. Must be a non-negative number or a string in the form
|
15483
15479
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15484
15480
|
* 25%. The default is 100%.
|
15485
|
-
* @param saturation [
|
15481
|
+
* @param saturation [Numeric, String] The fraction of the saturation component of the watermark pixels to
|
15486
15482
|
* be composited onto the target image. Must be a non-negative number or a string in the form
|
15487
15483
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15488
15484
|
* 25%. The default is 100%.
|
@@ -15493,11 +15489,11 @@ Image_virtual_pixel_method_eq(VALUE self, VALUE method)
|
|
15493
15489
|
* @overload watermark(mark, brightness, saturation, gravity, x_off = 0, y_off = 0)
|
15494
15490
|
* @param mark [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
|
15495
15491
|
* imagelist, uses the current image.
|
15496
|
-
* @param brightness [
|
15492
|
+
* @param brightness [Numeric, String] The fraction of the lightness component of the watermark pixels to be
|
15497
15493
|
* composited onto the target image. Must be a non-negative number or a string in the form
|
15498
15494
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15499
15495
|
* 25%. The default is 100%.
|
15500
|
-
* @param saturation [
|
15496
|
+
* @param saturation [Numeric, String] The fraction of the saturation component of the watermark pixels to
|
15501
15497
|
* be composited onto the target image. Must be a non-negative number or a string in the form
|
15502
15498
|
* "NN%". If lightness is a number it is interpreted as a percentage. Both 0.25 and "25%" mean
|
15503
15499
|
* 25%. The default is 100%.
|
@@ -15525,7 +15521,7 @@ Image_watermark(int argc, VALUE *argv, VALUE self)
|
|
15525
15521
|
|
15526
15522
|
if (argc < 1)
|
15527
15523
|
{
|
15528
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
15524
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 to 6)", argc);
|
15529
15525
|
}
|
15530
15526
|
|
15531
15527
|
ovly = rm_cur_image(argv[0]);
|
@@ -15547,7 +15543,7 @@ Image_watermark(int argc, VALUE *argv, VALUE self)
|
|
15547
15543
|
case 1:
|
15548
15544
|
break;
|
15549
15545
|
default:
|
15550
|
-
rb_raise(rb_eArgError, "wrong number of arguments (%d for
|
15546
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 to 6)", argc);
|
15551
15547
|
break;
|
15552
15548
|
}
|
15553
15549
|
|
@@ -15580,8 +15576,8 @@ Image_watermark(int argc, VALUE *argv, VALUE self)
|
|
15580
15576
|
* amplitude and wavelength is specified by the given parameters.
|
15581
15577
|
*
|
15582
15578
|
* @overload wave(amplitude = 25.0, wavelength = 150.0)
|
15583
|
-
* @param amplitude [
|
15584
|
-
* @param wavelength [
|
15579
|
+
* @param amplitude [Numeric] the amplitude
|
15580
|
+
* @param wavelength [Numeric] the wave length
|
15585
15581
|
* @return [Magick::Image] a new image
|
15586
15582
|
*/
|
15587
15583
|
VALUE
|
@@ -15625,11 +15621,11 @@ Image_wave(int argc, VALUE *argv, VALUE self)
|
|
15625
15621
|
* appears in the reflection.
|
15626
15622
|
*
|
15627
15623
|
* @overload wet_floor(initial = 0.5, rate = 1.0)
|
15628
|
-
* @param initial [
|
15624
|
+
* @param initial [Numeric] A value between 0.0 and 1.0 that specifies the initial percentage of
|
15629
15625
|
* transparency. Higher values cause the top of the reflection to be more transparent, lower
|
15630
15626
|
* values less transparent. The default is 0.5, which means that the top of the reflection is 50%
|
15631
15627
|
* transparent.
|
15632
|
-
* @param rate [
|
15628
|
+
* @param rate [Numeric] A non-negative value that specifies how rapidly the reflection transitions
|
15633
15629
|
* from the initial level of transparency to entirely transparent. The default value is 1.0, which
|
15634
15630
|
* means that the transition occurs in 1/3 the image height. Values greater than 1.0 speed up the
|
15635
15631
|
* transition (the reflection will have fewer rows), values lower than 1.0 slow down the
|
@@ -15811,9 +15807,9 @@ Image_wet_floor(int argc, VALUE *argv, VALUE self)
|
|
15811
15807
|
* unchanged.
|
15812
15808
|
*
|
15813
15809
|
* @overload white_threshold(red, green, blue, alpha: alpha)
|
15814
|
-
* @param red [
|
15815
|
-
* @param green [
|
15816
|
-
* @param blue [
|
15810
|
+
* @param red [Numeric] the number for red channel
|
15811
|
+
* @param green [Numeric] the number for green channel
|
15812
|
+
* @param blue [Numeric] the number for blue channel
|
15817
15813
|
* @param alpha [Numeric] the number for alpha channel
|
15818
15814
|
* @return [Magick::Image] a new image
|
15819
15815
|
* @see Image#black_threshold
|
@@ -15923,6 +15919,8 @@ void add_format_prefix(Info *info, VALUE file)
|
|
15923
15919
|
* Write the image to the file.
|
15924
15920
|
*
|
15925
15921
|
* @param file [File, String] the file
|
15922
|
+
* @yield [info]
|
15923
|
+
* @yieldparam info [Magick::Image::Info]
|
15926
15924
|
* @return [Magick::Image] self
|
15927
15925
|
*/
|
15928
15926
|
VALUE
|
@@ -15997,8 +15995,8 @@ Image_x_resolution(VALUE self)
|
|
15997
15995
|
/**
|
15998
15996
|
* Set the horizontal resolution of the image.
|
15999
15997
|
*
|
16000
|
-
* @param val [
|
16001
|
-
* @return [
|
15998
|
+
* @param val [Numeric] the resolution
|
15999
|
+
* @return [Numeric] the given resolution
|
16002
16000
|
*/
|
16003
16001
|
VALUE
|
16004
16002
|
Image_x_resolution_eq(VALUE self, VALUE val)
|
@@ -16020,8 +16018,8 @@ Image_y_resolution(VALUE self)
|
|
16020
16018
|
/**
|
16021
16019
|
* Set the vertical resolution of the image.
|
16022
16020
|
*
|
16023
|
-
* @param val [
|
16024
|
-
* @return [
|
16021
|
+
* @param val [Numeric] the resolution
|
16022
|
+
* @return [Numeric] the given resolution
|
16025
16023
|
*/
|
16026
16024
|
VALUE
|
16027
16025
|
Image_y_resolution_eq(VALUE self, VALUE val)
|
@@ -16043,8 +16041,8 @@ Image_x_resolution(VALUE self)
|
|
16043
16041
|
/**
|
16044
16042
|
* Set the horizontal resolution of the image.
|
16045
16043
|
*
|
16046
|
-
* @param val [
|
16047
|
-
* @return [
|
16044
|
+
* @param val [Numeric] the resolution
|
16045
|
+
* @return [Numeric] the given resolution
|
16048
16046
|
*/
|
16049
16047
|
VALUE
|
16050
16048
|
Image_x_resolution_eq(VALUE self, VALUE val)
|
@@ -16066,8 +16064,8 @@ Image_y_resolution(VALUE self)
|
|
16066
16064
|
/**
|
16067
16065
|
* Set the vertical resolution of the image.
|
16068
16066
|
*
|
16069
|
-
* @param val [
|
16070
|
-
* @return [
|
16067
|
+
* @param val [Numeric] the resolution
|
16068
|
+
* @return [Numeric] the given resolution
|
16071
16069
|
*/
|
16072
16070
|
VALUE
|
16073
16071
|
Image_y_resolution_eq(VALUE self, VALUE val)
|