ruby-vips 2.0.17 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
- data/.github/workflows/test.yml +80 -0
- data/.standard.yml +17 -0
- data/.yardopts +0 -1
- data/CHANGELOG.md +13 -0
- data/Gemfile +3 -1
- data/README.md +4 -4
- data/Rakefile +13 -21
- data/TODO +3 -6
- data/VERSION +1 -1
- data/example/annotate.rb +6 -6
- data/example/connection.rb +18 -9
- data/example/daltonize8.rb +6 -6
- data/example/draw_lines.rb +30 -0
- data/example/example1.rb +4 -4
- data/example/example2.rb +6 -6
- data/example/example3.rb +5 -5
- data/example/example4.rb +2 -2
- data/example/example5.rb +4 -4
- data/example/inheritance_with_refcount.rb +35 -36
- data/example/progress.rb +3 -3
- data/example/thumb.rb +6 -6
- data/example/trim8.rb +1 -1
- data/example/watermark.rb +2 -2
- data/example/wobble.rb +1 -1
- data/lib/ruby-vips.rb +1 -1
- data/lib/vips.rb +121 -75
- data/lib/vips/blend_mode.rb +29 -25
- data/lib/vips/connection.rb +4 -4
- data/lib/vips/gobject.rb +18 -11
- data/lib/vips/gvalue.rb +54 -54
- data/lib/vips/image.rb +232 -155
- data/lib/vips/interpolate.rb +3 -2
- data/lib/vips/methods.rb +165 -15
- data/lib/vips/mutableimage.rb +154 -0
- data/lib/vips/object.rb +84 -85
- data/lib/vips/operation.rb +161 -82
- data/lib/vips/region.rb +6 -6
- data/lib/vips/source.rb +11 -12
- data/lib/vips/sourcecustom.rb +7 -8
- data/lib/vips/target.rb +12 -13
- data/lib/vips/targetcustom.rb +9 -10
- data/lib/vips/version.rb +1 -1
- data/ruby-vips.gemspec +26 -22
- metadata +28 -48
- data/.rubocop.yml +0 -22
- data/.rubocop_todo.yml +0 -473
- data/.travis.yml +0 -57
- data/install-vips.sh +0 -26
data/lib/vips/interpolate.rb
CHANGED
@@ -48,8 +48,9 @@ module Vips
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def initialize name
|
51
|
-
|
52
|
-
|
51
|
+
name = name.to_s if name.is_a? Symbol
|
52
|
+
ptr = Vips.vips_interpolate_new name
|
53
|
+
raise Vips::Error if ptr.nil?
|
53
54
|
|
54
55
|
super ptr
|
55
56
|
end
|
data/lib/vips/methods.rb
CHANGED
@@ -462,6 +462,7 @@ module Vips
|
|
462
462
|
# Autorotate image by exif tag.
|
463
463
|
# @param opts [Hash] Set of options
|
464
464
|
# @option opts [Vips::Angle] :angle Output Angle image was rotated by
|
465
|
+
# @option opts [Boolean] :flip Output Whether the image was flipped or not
|
465
466
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
466
467
|
|
467
468
|
# @!method recomb(m, **opts)
|
@@ -586,6 +587,7 @@ module Vips
|
|
586
587
|
# @param opts [Hash] Set of options
|
587
588
|
# @option opts [Float] :sigma Standard deviation of pixels in generated image
|
588
589
|
# @option opts [Float] :mean Mean of pixels in generated image
|
590
|
+
# @option opts [Integer] :seed Random number seed
|
589
591
|
# @return [Vips::Image] Output image
|
590
592
|
|
591
593
|
# @!method self.text(text, **opts)
|
@@ -854,6 +856,7 @@ module Vips
|
|
854
856
|
# @param height [Integer] Image height in pixels
|
855
857
|
# @param opts [Hash] Set of options
|
856
858
|
# @option opts [Integer] :cell_size Size of Worley cells
|
859
|
+
# @option opts [Integer] :seed Random number seed
|
857
860
|
# @return [Vips::Image] Output image
|
858
861
|
|
859
862
|
# @!method self.perlin(width, height, **opts)
|
@@ -863,6 +866,7 @@ module Vips
|
|
863
866
|
# @param opts [Hash] Set of options
|
864
867
|
# @option opts [Integer] :cell_size Size of Perlin cells
|
865
868
|
# @option opts [Boolean] :uchar Output an unsigned char image
|
869
|
+
# @option opts [Integer] :seed Random number seed
|
866
870
|
# @return [Vips::Image] Output image
|
867
871
|
|
868
872
|
# @!method self.switch(tests, **opts)
|
@@ -872,7 +876,7 @@ module Vips
|
|
872
876
|
# @return [Vips::Image] Output image
|
873
877
|
|
874
878
|
# @!method self.csvload(filename, **opts)
|
875
|
-
# Load csv
|
879
|
+
# Load csv.
|
876
880
|
# @param filename [String] Filename to load from
|
877
881
|
# @param opts [Hash] Set of options
|
878
882
|
# @option opts [Integer] :skip Skip this many lines at the start of the file
|
@@ -887,8 +891,24 @@ module Vips
|
|
887
891
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
888
892
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
889
893
|
|
894
|
+
# @!method self.csvload_source(source, **opts)
|
895
|
+
# Load csv.
|
896
|
+
# @param source [Vips::Source] Source to load from
|
897
|
+
# @param opts [Hash] Set of options
|
898
|
+
# @option opts [Integer] :skip Skip this many lines at the start of the file
|
899
|
+
# @option opts [Integer] :lines Read this many lines from the file
|
900
|
+
# @option opts [String] :whitespace Set of whitespace characters
|
901
|
+
# @option opts [String] :separator Set of separator characters
|
902
|
+
# @option opts [Boolean] :memory Force open via memory
|
903
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
904
|
+
# @option opts [Boolean] :sequential Sequential read only
|
905
|
+
# @option opts [Boolean] :fail Fail on first error
|
906
|
+
# @option opts [Boolean] :disc Open to disc
|
907
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
908
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
909
|
+
|
890
910
|
# @!method self.matrixload(filename, **opts)
|
891
|
-
# Load matrix
|
911
|
+
# Load matrix.
|
892
912
|
# @param filename [String] Filename to load from
|
893
913
|
# @param opts [Hash] Set of options
|
894
914
|
# @option opts [Boolean] :memory Force open via memory
|
@@ -899,6 +919,18 @@ module Vips
|
|
899
919
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
900
920
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
901
921
|
|
922
|
+
# @!method self.matrixload_source(source, **opts)
|
923
|
+
# Load matrix.
|
924
|
+
# @param source [Vips::Source] Source to load from
|
925
|
+
# @param opts [Hash] Set of options
|
926
|
+
# @option opts [Boolean] :memory Force open via memory
|
927
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
928
|
+
# @option opts [Boolean] :sequential Sequential read only
|
929
|
+
# @option opts [Boolean] :fail Fail on first error
|
930
|
+
# @option opts [Boolean] :disc Open to disc
|
931
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
932
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
933
|
+
|
902
934
|
# @!method self.rawload(filename, width, height, bands, **opts)
|
903
935
|
# Load raw data from a file.
|
904
936
|
# @param filename [String] Filename to load from
|
@@ -953,6 +985,18 @@ module Vips
|
|
953
985
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
954
986
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
955
987
|
|
988
|
+
# @!method self.ppmload_source(source, **opts)
|
989
|
+
# Load ppm base class.
|
990
|
+
# @param source [Vips::Source] Source to load from
|
991
|
+
# @param opts [Hash] Set of options
|
992
|
+
# @option opts [Boolean] :memory Force open via memory
|
993
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
994
|
+
# @option opts [Boolean] :sequential Sequential read only
|
995
|
+
# @option opts [Boolean] :fail Fail on first error
|
996
|
+
# @option opts [Boolean] :disc Open to disc
|
997
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
998
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
999
|
+
|
956
1000
|
# @!method self.radload(filename, **opts)
|
957
1001
|
# Load a radiance image from a file.
|
958
1002
|
# @param filename [String] Filename to load from
|
@@ -990,7 +1034,7 @@ module Vips
|
|
990
1034
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
991
1035
|
|
992
1036
|
# @!method self.pdfload(filename, **opts)
|
993
|
-
# Load pdf
|
1037
|
+
# Load pdf from file.
|
994
1038
|
# @param filename [String] Filename to load from
|
995
1039
|
# @param opts [Hash] Set of options
|
996
1040
|
# @option opts [Integer] :page Load this page from the file
|
@@ -1007,7 +1051,7 @@ module Vips
|
|
1007
1051
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
1008
1052
|
|
1009
1053
|
# @!method self.pdfload_buffer(buffer, **opts)
|
1010
|
-
# Load pdf
|
1054
|
+
# Load pdf from buffer.
|
1011
1055
|
# @param buffer [VipsBlob] Buffer to load from
|
1012
1056
|
# @param opts [Hash] Set of options
|
1013
1057
|
# @option opts [Integer] :page Load this page from the file
|
@@ -1023,13 +1067,15 @@ module Vips
|
|
1023
1067
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
1024
1068
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
1025
1069
|
|
1026
|
-
# @!method self.
|
1027
|
-
# Load
|
1028
|
-
# @param
|
1070
|
+
# @!method self.pdfload_source(source, **opts)
|
1071
|
+
# Load pdf from source.
|
1072
|
+
# @param source [Vips::Source] Source to load from
|
1029
1073
|
# @param opts [Hash] Set of options
|
1074
|
+
# @option opts [Integer] :page Load this page from the file
|
1075
|
+
# @option opts [Integer] :n Load this many pages
|
1030
1076
|
# @option opts [Float] :dpi Render at this DPI
|
1031
1077
|
# @option opts [Float] :scale Scale output by this factor
|
1032
|
-
# @option opts [
|
1078
|
+
# @option opts [Array<Double>] :background Background value
|
1033
1079
|
# @option opts [Boolean] :memory Force open via memory
|
1034
1080
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
1035
1081
|
# @option opts [Boolean] :sequential Sequential read only
|
@@ -1111,6 +1157,20 @@ module Vips
|
|
1111
1157
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
1112
1158
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
1113
1159
|
|
1160
|
+
# @!method self.gifload_source(source, **opts)
|
1161
|
+
# Load gif with giflib.
|
1162
|
+
# @param source [Vips::Source] Source to load from
|
1163
|
+
# @param opts [Hash] Set of options
|
1164
|
+
# @option opts [Integer] :page Load this page from the file
|
1165
|
+
# @option opts [Integer] :n Load this many pages
|
1166
|
+
# @option opts [Boolean] :memory Force open via memory
|
1167
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
1168
|
+
# @option opts [Boolean] :sequential Sequential read only
|
1169
|
+
# @option opts [Boolean] :fail Fail on first error
|
1170
|
+
# @option opts [Boolean] :disc Open to disc
|
1171
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
1172
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
1173
|
+
|
1114
1174
|
# @!method self.pngload(filename, **opts)
|
1115
1175
|
# Load png from file.
|
1116
1176
|
# @param filename [String] Filename to load from
|
@@ -1254,6 +1314,7 @@ module Vips
|
|
1254
1314
|
# @param filename [String] Filename to load from
|
1255
1315
|
# @param opts [Hash] Set of options
|
1256
1316
|
# @option opts [Integer] :page Load this page from the image
|
1317
|
+
# @option opts [Integer] :subifd Select subifd index
|
1257
1318
|
# @option opts [Integer] :n Load this many pages
|
1258
1319
|
# @option opts [Boolean] :autorotate Rotate image using orientation tag
|
1259
1320
|
# @option opts [Boolean] :memory Force open via memory
|
@@ -1269,6 +1330,7 @@ module Vips
|
|
1269
1330
|
# @param buffer [VipsBlob] Buffer to load from
|
1270
1331
|
# @param opts [Hash] Set of options
|
1271
1332
|
# @option opts [Integer] :page Load this page from the image
|
1333
|
+
# @option opts [Integer] :subifd Select subifd index
|
1272
1334
|
# @option opts [Integer] :n Load this many pages
|
1273
1335
|
# @option opts [Boolean] :autorotate Rotate image using orientation tag
|
1274
1336
|
# @option opts [Boolean] :memory Force open via memory
|
@@ -1284,6 +1346,7 @@ module Vips
|
|
1284
1346
|
# @param source [Vips::Source] Source to load from
|
1285
1347
|
# @param opts [Hash] Set of options
|
1286
1348
|
# @option opts [Integer] :page Load this page from the image
|
1349
|
+
# @option opts [Integer] :subifd Select subifd index
|
1287
1350
|
# @option opts [Integer] :n Load this many pages
|
1288
1351
|
# @option opts [Boolean] :autorotate Rotate image using orientation tag
|
1289
1352
|
# @option opts [Boolean] :memory Force open via memory
|
@@ -1410,8 +1473,24 @@ module Vips
|
|
1410
1473
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
1411
1474
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
1412
1475
|
|
1476
|
+
# @!method self.heifload_source(source, **opts)
|
1477
|
+
# Load a heif image.
|
1478
|
+
# @param source [Vips::Source] Source to load from
|
1479
|
+
# @param opts [Hash] Set of options
|
1480
|
+
# @option opts [Integer] :page Load this page from the file
|
1481
|
+
# @option opts [Integer] :n Load this many pages
|
1482
|
+
# @option opts [Boolean] :thumbnail Fetch thumbnail image
|
1483
|
+
# @option opts [Boolean] :autorotate Rotate image using exif orientation
|
1484
|
+
# @option opts [Boolean] :memory Force open via memory
|
1485
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
1486
|
+
# @option opts [Boolean] :sequential Sequential read only
|
1487
|
+
# @option opts [Boolean] :fail Fail on first error
|
1488
|
+
# @option opts [Boolean] :disc Open to disc
|
1489
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
1490
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
1491
|
+
|
1413
1492
|
# @!method csvsave(filename, **opts)
|
1414
|
-
# Save image to csv
|
1493
|
+
# Save image to csv.
|
1415
1494
|
# @param filename [String] Filename to save to
|
1416
1495
|
# @param opts [Hash] Set of options
|
1417
1496
|
# @option opts [String] :separator Separator characters
|
@@ -1420,8 +1499,18 @@ module Vips
|
|
1420
1499
|
# @option opts [Integer] :page_height Set page height for multipage save
|
1421
1500
|
# @return [nil]
|
1422
1501
|
|
1502
|
+
# @!method csvsave_target(target, **opts)
|
1503
|
+
# Save image to csv.
|
1504
|
+
# @param target [Vips::Target] Target to save to
|
1505
|
+
# @param opts [Hash] Set of options
|
1506
|
+
# @option opts [String] :separator Separator characters
|
1507
|
+
# @option opts [Boolean] :strip Strip all metadata from image
|
1508
|
+
# @option opts [Array<Double>] :background Background value
|
1509
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
1510
|
+
# @return [nil]
|
1511
|
+
|
1423
1512
|
# @!method matrixsave(filename, **opts)
|
1424
|
-
# Save image to matrix
|
1513
|
+
# Save image to matrix.
|
1425
1514
|
# @param filename [String] Filename to save to
|
1426
1515
|
# @param opts [Hash] Set of options
|
1427
1516
|
# @option opts [Boolean] :strip Strip all metadata from image
|
@@ -1429,6 +1518,15 @@ module Vips
|
|
1429
1518
|
# @option opts [Integer] :page_height Set page height for multipage save
|
1430
1519
|
# @return [nil]
|
1431
1520
|
|
1521
|
+
# @!method matrixsave_target(target, **opts)
|
1522
|
+
# Save image to matrix.
|
1523
|
+
# @param target [Vips::Target] Target to save to
|
1524
|
+
# @param opts [Hash] Set of options
|
1525
|
+
# @option opts [Boolean] :strip Strip all metadata from image
|
1526
|
+
# @option opts [Array<Double>] :background Background value
|
1527
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
1528
|
+
# @return [nil]
|
1529
|
+
|
1432
1530
|
# @!method matrixprint(**opts)
|
1433
1531
|
# Print matrix.
|
1434
1532
|
# @param opts [Hash] Set of options
|
@@ -1470,6 +1568,19 @@ module Vips
|
|
1470
1568
|
# @param opts [Hash] Set of options
|
1471
1569
|
# @option opts [Boolean] :ascii save as ascii
|
1472
1570
|
# @option opts [Boolean] :squash save as one bit
|
1571
|
+
# @option opts [Integer] :bitdepth set to 1 to write as a 1 bit image
|
1572
|
+
# @option opts [Boolean] :strip Strip all metadata from image
|
1573
|
+
# @option opts [Array<Double>] :background Background value
|
1574
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
1575
|
+
# @return [nil]
|
1576
|
+
|
1577
|
+
# @!method ppmsave_target(target, **opts)
|
1578
|
+
# Save to ppm.
|
1579
|
+
# @param target [Vips::Target] Target to save to
|
1580
|
+
# @param opts [Hash] Set of options
|
1581
|
+
# @option opts [Boolean] :ascii save as ascii
|
1582
|
+
# @option opts [Boolean] :squash save as one bit
|
1583
|
+
# @option opts [Integer] :bitdepth set to 1 to write as a 1 bit image
|
1473
1584
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1474
1585
|
# @option opts [Array<Double>] :background Background value
|
1475
1586
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1522,6 +1633,7 @@ module Vips
|
|
1522
1633
|
# @option opts [Vips::RegionShrink] :region_shrink Method to shrink regions
|
1523
1634
|
# @option opts [Integer] :skip_blanks Skip tiles which are nearly equal to the background
|
1524
1635
|
# @option opts [Boolean] :no_strip Don't strip tile metadata
|
1636
|
+
# @option opts [String] :id Resource ID
|
1525
1637
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1526
1638
|
# @option opts [Array<Double>] :background Background value
|
1527
1639
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1547,6 +1659,7 @@ module Vips
|
|
1547
1659
|
# @option opts [Vips::RegionShrink] :region_shrink Method to shrink regions
|
1548
1660
|
# @option opts [Integer] :skip_blanks Skip tiles which are nearly equal to the background
|
1549
1661
|
# @option opts [Boolean] :no_strip Don't strip tile metadata
|
1662
|
+
# @option opts [String] :id Resource ID
|
1550
1663
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1551
1664
|
# @option opts [Array<Double>] :background Background value
|
1552
1665
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1564,6 +1677,7 @@ module Vips
|
|
1564
1677
|
# @option opts [Integer] :colours Max number of palette colours
|
1565
1678
|
# @option opts [Integer] :Q Quantisation quality
|
1566
1679
|
# @option opts [Float] :dither Amount of dithering
|
1680
|
+
# @option opts [Integer] :bitdepth Write as a 1, 2, 4 or 8 bit image
|
1567
1681
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1568
1682
|
# @option opts [Array<Double>] :background Background value
|
1569
1683
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1580,6 +1694,7 @@ module Vips
|
|
1580
1694
|
# @option opts [Integer] :colours Max number of palette colours
|
1581
1695
|
# @option opts [Integer] :Q Quantisation quality
|
1582
1696
|
# @option opts [Float] :dither Amount of dithering
|
1697
|
+
# @option opts [Integer] :bitdepth Write as a 1, 2, 4 or 8 bit image
|
1583
1698
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1584
1699
|
# @option opts [Array<Double>] :background Background value
|
1585
1700
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1597,6 +1712,7 @@ module Vips
|
|
1597
1712
|
# @option opts [Integer] :colours Max number of palette colours
|
1598
1713
|
# @option opts [Integer] :Q Quantisation quality
|
1599
1714
|
# @option opts [Float] :dither Amount of dithering
|
1715
|
+
# @option opts [Integer] :bitdepth Write as a 1, 2, 4 or 8 bit image
|
1600
1716
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1601
1717
|
# @option opts [Array<Double>] :background Background value
|
1602
1718
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1615,6 +1731,7 @@ module Vips
|
|
1615
1731
|
# @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
|
1616
1732
|
# @option opts [Boolean] :optimize_scans Split spectrum of DCT coefficients into separate scans
|
1617
1733
|
# @option opts [Integer] :quant_table Use predefined quantization table with given index
|
1734
|
+
# @option opts [Vips::ForeignJpegSubsample] :subsample_mode Select chroma subsample operation mode
|
1618
1735
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1619
1736
|
# @option opts [Array<Double>] :background Background value
|
1620
1737
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1632,6 +1749,7 @@ module Vips
|
|
1632
1749
|
# @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
|
1633
1750
|
# @option opts [Boolean] :optimize_scans Split spectrum of DCT coefficients into separate scans
|
1634
1751
|
# @option opts [Integer] :quant_table Use predefined quantization table with given index
|
1752
|
+
# @option opts [Vips::ForeignJpegSubsample] :subsample_mode Select chroma subsample operation mode
|
1635
1753
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1636
1754
|
# @option opts [Array<Double>] :background Background value
|
1637
1755
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1650,6 +1768,7 @@ module Vips
|
|
1650
1768
|
# @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
|
1651
1769
|
# @option opts [Boolean] :optimize_scans Split spectrum of DCT coefficients into separate scans
|
1652
1770
|
# @option opts [Integer] :quant_table Use predefined quantization table with given index
|
1771
|
+
# @option opts [Vips::ForeignJpegSubsample] :subsample_mode Select chroma subsample operation mode
|
1653
1772
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1654
1773
|
# @option opts [Array<Double>] :background Background value
|
1655
1774
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1667,6 +1786,7 @@ module Vips
|
|
1667
1786
|
# @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
|
1668
1787
|
# @option opts [Boolean] :optimize_scans Split spectrum of DCT coefficients into separate scans
|
1669
1788
|
# @option opts [Integer] :quant_table Use predefined quantization table with given index
|
1789
|
+
# @option opts [Vips::ForeignJpegSubsample] :subsample_mode Select chroma subsample operation mode
|
1670
1790
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1671
1791
|
# @option opts [Array<Double>] :background Background value
|
1672
1792
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1686,6 +1806,7 @@ module Vips
|
|
1686
1806
|
# @option opts [Integer] :kmin Minimum number of frames between key frames
|
1687
1807
|
# @option opts [Integer] :kmax Maximum number of frames between key frames
|
1688
1808
|
# @option opts [Integer] :reduction_effort Level of CPU effort to reduce file size
|
1809
|
+
# @option opts [String] :profile ICC profile to embed
|
1689
1810
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1690
1811
|
# @option opts [Array<Double>] :background Background value
|
1691
1812
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1704,6 +1825,7 @@ module Vips
|
|
1704
1825
|
# @option opts [Integer] :kmin Minimum number of frames between key frames
|
1705
1826
|
# @option opts [Integer] :kmax Maximum number of frames between key frames
|
1706
1827
|
# @option opts [Integer] :reduction_effort Level of CPU effort to reduce file size
|
1828
|
+
# @option opts [String] :profile ICC profile to embed
|
1707
1829
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1708
1830
|
# @option opts [Array<Double>] :background Background value
|
1709
1831
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1723,6 +1845,7 @@ module Vips
|
|
1723
1845
|
# @option opts [Integer] :kmin Minimum number of frames between key frames
|
1724
1846
|
# @option opts [Integer] :kmax Maximum number of frames between key frames
|
1725
1847
|
# @option opts [Integer] :reduction_effort Level of CPU effort to reduce file size
|
1848
|
+
# @option opts [String] :profile ICC profile to embed
|
1726
1849
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1727
1850
|
# @option opts [Array<Double>] :background Background value
|
1728
1851
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1740,8 +1863,9 @@ module Vips
|
|
1740
1863
|
# @option opts [Integer] :tile_width Tile width in pixels
|
1741
1864
|
# @option opts [Integer] :tile_height Tile height in pixels
|
1742
1865
|
# @option opts [Boolean] :pyramid Write a pyramidal tiff
|
1743
|
-
# @option opts [Boolean] :miniswhite Use 0 for white in 1-bit images
|
1744
1866
|
# @option opts [Boolean] :squash Squash images down to 1 bit
|
1867
|
+
# @option opts [Boolean] :miniswhite Use 0 for white in 1-bit images
|
1868
|
+
# @option opts [Integer] :bitdepth Write as a 1, 2, 4 or 8 bit image
|
1745
1869
|
# @option opts [Vips::ForeignTiffResunit] :resunit Resolution unit
|
1746
1870
|
# @option opts [Float] :xres Horizontal resolution in pixels/mm
|
1747
1871
|
# @option opts [Float] :yres Vertical resolution in pixels/mm
|
@@ -1750,7 +1874,9 @@ module Vips
|
|
1750
1874
|
# @option opts [Boolean] :properties Write a properties document to IMAGEDESCRIPTION
|
1751
1875
|
# @option opts [Vips::RegionShrink] :region_shrink Method to shrink regions
|
1752
1876
|
# @option opts [Integer] :level ZSTD compression level
|
1877
|
+
# @option opts [Boolean] :subifd Save pyr layers as sub-IFDs
|
1753
1878
|
# @option opts [Boolean] :lossless Enable WEBP lossless mode
|
1879
|
+
# @option opts [Vips::ForeignDzDepth] :depth Pyramid depth
|
1754
1880
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1755
1881
|
# @option opts [Array<Double>] :background Background value
|
1756
1882
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1767,8 +1893,9 @@ module Vips
|
|
1767
1893
|
# @option opts [Integer] :tile_width Tile width in pixels
|
1768
1894
|
# @option opts [Integer] :tile_height Tile height in pixels
|
1769
1895
|
# @option opts [Boolean] :pyramid Write a pyramidal tiff
|
1770
|
-
# @option opts [Boolean] :miniswhite Use 0 for white in 1-bit images
|
1771
1896
|
# @option opts [Boolean] :squash Squash images down to 1 bit
|
1897
|
+
# @option opts [Boolean] :miniswhite Use 0 for white in 1-bit images
|
1898
|
+
# @option opts [Integer] :bitdepth Write as a 1, 2, 4 or 8 bit image
|
1772
1899
|
# @option opts [Vips::ForeignTiffResunit] :resunit Resolution unit
|
1773
1900
|
# @option opts [Float] :xres Horizontal resolution in pixels/mm
|
1774
1901
|
# @option opts [Float] :yres Vertical resolution in pixels/mm
|
@@ -1777,7 +1904,9 @@ module Vips
|
|
1777
1904
|
# @option opts [Boolean] :properties Write a properties document to IMAGEDESCRIPTION
|
1778
1905
|
# @option opts [Vips::RegionShrink] :region_shrink Method to shrink regions
|
1779
1906
|
# @option opts [Integer] :level ZSTD compression level
|
1907
|
+
# @option opts [Boolean] :subifd Save pyr layers as sub-IFDs
|
1780
1908
|
# @option opts [Boolean] :lossless Enable WEBP lossless mode
|
1909
|
+
# @option opts [Vips::ForeignDzDepth] :depth Pyramid depth
|
1781
1910
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1782
1911
|
# @option opts [Array<Double>] :background Background value
|
1783
1912
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1833,6 +1962,7 @@ module Vips
|
|
1833
1962
|
# @option opts [Integer] :Q Q factor
|
1834
1963
|
# @option opts [Boolean] :lossless Enable lossless compression
|
1835
1964
|
# @option opts [Vips::ForeignHeifCompression] :compression Compression format
|
1965
|
+
# @option opts [Integer] :speed CPU effort
|
1836
1966
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1837
1967
|
# @option opts [Array<Double>] :background Background value
|
1838
1968
|
# @option opts [Integer] :page_height Set page height for multipage save
|
@@ -1844,11 +1974,25 @@ module Vips
|
|
1844
1974
|
# @option opts [Integer] :Q Q factor
|
1845
1975
|
# @option opts [Boolean] :lossless Enable lossless compression
|
1846
1976
|
# @option opts [Vips::ForeignHeifCompression] :compression Compression format
|
1977
|
+
# @option opts [Integer] :speed CPU effort
|
1847
1978
|
# @option opts [Boolean] :strip Strip all metadata from image
|
1848
1979
|
# @option opts [Array<Double>] :background Background value
|
1849
1980
|
# @option opts [Integer] :page_height Set page height for multipage save
|
1850
1981
|
# @return [VipsBlob] Buffer to save to
|
1851
1982
|
|
1983
|
+
# @!method heifsave_target(target, **opts)
|
1984
|
+
# Save image in heif format.
|
1985
|
+
# @param target [Vips::Target] Target to save to
|
1986
|
+
# @param opts [Hash] Set of options
|
1987
|
+
# @option opts [Integer] :Q Q factor
|
1988
|
+
# @option opts [Boolean] :lossless Enable lossless compression
|
1989
|
+
# @option opts [Vips::ForeignHeifCompression] :compression Compression format
|
1990
|
+
# @option opts [Integer] :speed CPU effort
|
1991
|
+
# @option opts [Boolean] :strip Strip all metadata from image
|
1992
|
+
# @option opts [Array<Double>] :background Background value
|
1993
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
1994
|
+
# @return [nil]
|
1995
|
+
|
1852
1996
|
# @!method self.thumbnail(filename, width, **opts)
|
1853
1997
|
# Generate thumbnail from file.
|
1854
1998
|
# @param filename [String] Filename to read from
|
@@ -1991,6 +2135,7 @@ module Vips
|
|
1991
2135
|
# @option opts [Float] :idx Horizontal input displacement
|
1992
2136
|
# @option opts [Float] :idy Vertical input displacement
|
1993
2137
|
# @option opts [Array<Double>] :background Background value
|
2138
|
+
# @option opts [Boolean] :premultiplied Images have premultiplied alpha
|
1994
2139
|
# @option opts [Vips::Extend] :extend How to generate the extra pixels
|
1995
2140
|
# @return [Vips::Image] Output image
|
1996
2141
|
|
@@ -2537,7 +2682,7 @@ module Vips
|
|
2537
2682
|
# @!method merge(sec, direction, dx, dy, **opts)
|
2538
2683
|
# Merge two images.
|
2539
2684
|
# @param sec [Vips::Image] Secondary image
|
2540
|
-
# @param direction [Vips::Direction] Horizontal or
|
2685
|
+
# @param direction [Vips::Direction] Horizontal or vertical merge
|
2541
2686
|
# @param dx [Integer] Horizontal displacement from sec to ref
|
2542
2687
|
# @param dy [Integer] Vertical displacement from sec to ref
|
2543
2688
|
# @param opts [Hash] Set of options
|
@@ -2547,7 +2692,7 @@ module Vips
|
|
2547
2692
|
# @!method mosaic(sec, direction, xref, yref, xsec, ysec, **opts)
|
2548
2693
|
# Mosaic two images.
|
2549
2694
|
# @param sec [Vips::Image] Secondary image
|
2550
|
-
# @param direction [Vips::Direction] Horizontal or
|
2695
|
+
# @param direction [Vips::Direction] Horizontal or vertical mosaic
|
2551
2696
|
# @param xref [Integer] Position of reference tie-point
|
2552
2697
|
# @param yref [Integer] Position of reference tie-point
|
2553
2698
|
# @param xsec [Integer] Position of secondary tie-point
|
@@ -2568,7 +2713,7 @@ module Vips
|
|
2568
2713
|
# @!method mosaic1(sec, direction, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, **opts)
|
2569
2714
|
# First-order mosaic of two images.
|
2570
2715
|
# @param sec [Vips::Image] Secondary image
|
2571
|
-
# @param direction [Vips::Direction] Horizontal or
|
2716
|
+
# @param direction [Vips::Direction] Horizontal or vertical mosaic
|
2572
2717
|
# @param xr1 [Integer] Position of first reference tie-point
|
2573
2718
|
# @param yr1 [Integer] Position of first reference tie-point
|
2574
2719
|
# @param xs1 [Integer] Position of first secondary tie-point
|
@@ -2586,6 +2731,11 @@ module Vips
|
|
2586
2731
|
# @option opts [Integer] :bandno Band to search for features on
|
2587
2732
|
# @return [Vips::Image] Output image
|
2588
2733
|
|
2734
|
+
# @!method matrixinvert(**opts)
|
2735
|
+
# Invert an matrix.
|
2736
|
+
# @param opts [Hash] Set of options
|
2737
|
+
# @return [Vips::Image] Output matrix
|
2738
|
+
|
2589
2739
|
# @!method match(sec, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, **opts)
|
2590
2740
|
# First-order match of two images.
|
2591
2741
|
# @param sec [Vips::Image] Secondary image
|