ruby-vips 2.2.5 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +2 -2
- data/CHANGELOG.md +7 -0
- data/VERSION +1 -1
- data/example/inheritance_with_refcount.rb +3 -0
- data/lib/vips/foreign_keep.rb +1 -0
- data/lib/vips/image.rb +31 -6
- data/lib/vips/methods.rb +241 -116
- data/lib/vips/mutableimage.rb +1 -0
- data/lib/vips/version.rb +1 -1
- data/lib/vips.rb +14 -12
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b025e3dd6e37cb95d8b77fea2351d2c8bef1d711cb8fd600d1532fed3ce606db
|
|
4
|
+
data.tar.gz: 245512b73bdb8db46af18c499060b2e2ab39ab2976c1eabc4866f0610fc51e0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28e0163d98af345d4b01536f508a28d052a594ee84e4a171d61960dc1af09c79c92aa063557cb5ff66b38f334c36f18ed3c262c13e68dcacbe65ee8ece277bef
|
|
7
|
+
data.tar.gz: 7a84837e453159d4126bc6dded6f3a6e3d76fdc43e1725fa6aa5d72b5bb6eeceb2c9240f05c8a4c3f804b56165bff3f0a7129b16b7573805eb38ae6246d7c66c
|
data/.github/workflows/test.yml
CHANGED
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout code
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v6
|
|
17
17
|
|
|
18
18
|
- name: Set up Ruby
|
|
19
19
|
uses: ruby/setup-ruby@v1
|
|
@@ -47,7 +47,7 @@ jobs:
|
|
|
47
47
|
|
|
48
48
|
steps:
|
|
49
49
|
- name: Checkout code
|
|
50
|
-
uses: actions/checkout@
|
|
50
|
+
uses: actions/checkout@v6
|
|
51
51
|
|
|
52
52
|
- name: Set up Ruby
|
|
53
53
|
uses: ruby/setup-ruby@v1
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## Version 2.3.0 (2025-12-10)
|
|
6
|
+
|
|
7
|
+
* move library_name out of the global namespace and into FFI [jcupitt]
|
|
8
|
+
* update docs for libvips 8.18 [jcupitt]
|
|
9
|
+
* add Image#get_gainmap [jcupitt]
|
|
10
|
+
* version bump to 2.3
|
|
11
|
+
|
|
5
12
|
## Version 2.2.5 (2025-08-20)
|
|
6
13
|
|
|
7
14
|
* improve NULL pointer handling [dloebl]
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.3.0
|
|
@@ -21,6 +21,7 @@ end
|
|
|
21
21
|
|
|
22
22
|
module Libc
|
|
23
23
|
extend FFI::Library
|
|
24
|
+
|
|
24
25
|
ffi_lib FFI::Library::LIBC
|
|
25
26
|
|
|
26
27
|
attach_function :malloc, [:size_t], :pointer
|
|
@@ -29,6 +30,7 @@ end
|
|
|
29
30
|
|
|
30
31
|
module GLib
|
|
31
32
|
extend FFI::Library
|
|
33
|
+
|
|
32
34
|
ffi_lib "gobject-2.0"
|
|
33
35
|
|
|
34
36
|
def self.set_log_domain(_domain)
|
|
@@ -142,6 +144,7 @@ end
|
|
|
142
144
|
|
|
143
145
|
module Vips
|
|
144
146
|
extend FFI::Library
|
|
147
|
+
|
|
145
148
|
ffi_lib "vips"
|
|
146
149
|
|
|
147
150
|
LOG_DOMAIN = "VIPS"
|
data/lib/vips/foreign_keep.rb
CHANGED
data/lib/vips/image.rb
CHANGED
|
@@ -50,6 +50,10 @@ module Vips
|
|
|
50
50
|
attach_function :vips_addalpha, [:pointer, :pointer, :varargs], :int
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
+
if Vips.at_least_libvips?(8, 18)
|
|
54
|
+
attach_function :vips_image_get_gainmap, [:pointer], :pointer
|
|
55
|
+
end
|
|
56
|
+
|
|
53
57
|
# move these three lines to mutableimage when we finally remove set and
|
|
54
58
|
# remove in this class
|
|
55
59
|
attach_function :vips_image_set,
|
|
@@ -797,8 +801,33 @@ module Vips
|
|
|
797
801
|
names
|
|
798
802
|
end
|
|
799
803
|
|
|
804
|
+
# Get the gainmap (if any) from an image.
|
|
805
|
+
#
|
|
806
|
+
# After modifying the gainmap, you should write it back to the image in a
|
|
807
|
+
# mutable block, see [#mutate], in the field "gainmap".
|
|
808
|
+
#
|
|
809
|
+
# For example:
|
|
810
|
+
#
|
|
811
|
+
# ```ruby
|
|
812
|
+
# gainmap = image.get_gainmap
|
|
813
|
+
# unless gainmap.nil?
|
|
814
|
+
# new_gainmap = gainmap.crop left, top, width, height
|
|
815
|
+
# image = image.mutate do |x|
|
|
816
|
+
# x.set_type! Vips::IMAGE_TYPE, "gainmap", new_gainmap
|
|
817
|
+
# end
|
|
818
|
+
# end
|
|
819
|
+
# ```
|
|
820
|
+
#
|
|
821
|
+
# @return [Image] the gainmap image, or nil
|
|
822
|
+
def get_gainmap
|
|
823
|
+
if Vips.at_least_libvips?(8, 18)
|
|
824
|
+
vi = Vips.vips_image_get_gainmap self
|
|
825
|
+
Image.new(vi) unless vi.null?
|
|
826
|
+
end
|
|
827
|
+
end
|
|
828
|
+
|
|
800
829
|
# Mutate an image with a block. Inside the block, you can call methods
|
|
801
|
-
# which modify the image, such as setting or removing metadata
|
|
830
|
+
# which modify the image, such as setting or removing metadata or
|
|
802
831
|
# modifying pixels.
|
|
803
832
|
#
|
|
804
833
|
# For example:
|
|
@@ -1173,11 +1202,7 @@ module Vips
|
|
|
1173
1202
|
# @return [Image] result of inequality
|
|
1174
1203
|
def != other
|
|
1175
1204
|
# for equality, we must allow tests against nil
|
|
1176
|
-
|
|
1177
|
-
true
|
|
1178
|
-
else
|
|
1179
|
-
call_enum "relational", other, :noteq
|
|
1180
|
-
end
|
|
1205
|
+
other.nil? || call_enum("relational", other, :noteq)
|
|
1181
1206
|
end
|
|
1182
1207
|
|
|
1183
1208
|
# Fetch bands using a number or a range
|
data/lib/vips/methods.rb
CHANGED
|
@@ -6,8 +6,9 @@ module Vips
|
|
|
6
6
|
# @param cmd_format [String] Command to run
|
|
7
7
|
# @param opts [Hash] Set of options
|
|
8
8
|
# @option opts [Array<Image>] :im Array of input images
|
|
9
|
-
# @option opts [String] :out_format Format for output filename
|
|
10
9
|
# @option opts [String] :in_format Format for input filename
|
|
10
|
+
# @option opts [String] :out_format Format for output filename
|
|
11
|
+
# @option opts [Boolean] :cache Cache this call
|
|
11
12
|
# @option opts [Vips::Image] :out Output Output image
|
|
12
13
|
# @option opts [String] :log Output Command log
|
|
13
14
|
# @return [nil, Hash<Symbol => Object>] Hash of optional output items
|
|
@@ -1199,6 +1200,78 @@ module Vips
|
|
|
1199
1200
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1200
1201
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1201
1202
|
|
|
1203
|
+
# @!method self.dcrawload(filename, **opts)
|
|
1204
|
+
# Load raw camera files.
|
|
1205
|
+
# @param filename [String] Filename to load from
|
|
1206
|
+
# @param opts [Hash] Set of options
|
|
1207
|
+
# @option opts [Integer] :bitdepth Number of bits per pixel
|
|
1208
|
+
# @option opts [Boolean] :memory Force open via memory
|
|
1209
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1210
|
+
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1211
|
+
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1212
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1213
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1214
|
+
|
|
1215
|
+
# @!method self.dcrawload_buffer(buffer, **opts)
|
|
1216
|
+
# Load raw camera files.
|
|
1217
|
+
# @param buffer [VipsBlob] Buffer to load from
|
|
1218
|
+
# @param opts [Hash] Set of options
|
|
1219
|
+
# @option opts [Integer] :bitdepth Number of bits per pixel
|
|
1220
|
+
# @option opts [Boolean] :memory Force open via memory
|
|
1221
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1222
|
+
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1223
|
+
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1224
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1225
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1226
|
+
|
|
1227
|
+
# @!method self.dcrawload_source(source, **opts)
|
|
1228
|
+
# Load raw camera files.
|
|
1229
|
+
# @param source [Vips::Source] Source to load from
|
|
1230
|
+
# @param opts [Hash] Set of options
|
|
1231
|
+
# @option opts [Integer] :bitdepth Number of bits per pixel
|
|
1232
|
+
# @option opts [Boolean] :memory Force open via memory
|
|
1233
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1234
|
+
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1235
|
+
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1236
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1237
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1238
|
+
|
|
1239
|
+
# @!method self.uhdrload(filename, **opts)
|
|
1240
|
+
# Load a uhdr image.
|
|
1241
|
+
# @param filename [String] Filename to load from
|
|
1242
|
+
# @param opts [Hash] Set of options
|
|
1243
|
+
# @option opts [Integer] :shrink Shrink factor on load
|
|
1244
|
+
# @option opts [Boolean] :memory Force open via memory
|
|
1245
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1246
|
+
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1247
|
+
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1248
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1249
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1250
|
+
|
|
1251
|
+
# @!method self.uhdrload_buffer(buffer, **opts)
|
|
1252
|
+
# Load a uhdr image.
|
|
1253
|
+
# @param buffer [VipsBlob] Buffer to load from
|
|
1254
|
+
# @param opts [Hash] Set of options
|
|
1255
|
+
# @option opts [Integer] :shrink Shrink factor on load
|
|
1256
|
+
# @option opts [Boolean] :memory Force open via memory
|
|
1257
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1258
|
+
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1259
|
+
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1260
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1261
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1262
|
+
|
|
1263
|
+
# @!method self.uhdrload_source(source, **opts)
|
|
1264
|
+
# Load a uhdr image.
|
|
1265
|
+
# @param source [Vips::Source] Source to load from
|
|
1266
|
+
# @param opts [Hash] Set of options
|
|
1267
|
+
# @option opts [Integer] :shrink Shrink factor on load
|
|
1268
|
+
# @option opts [Boolean] :memory Force open via memory
|
|
1269
|
+
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1270
|
+
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1271
|
+
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1272
|
+
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1273
|
+
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1274
|
+
|
|
1202
1275
|
# @!method self.pngload(filename, **opts)
|
|
1203
1276
|
# Load png from file.
|
|
1204
1277
|
# @param filename [String] Filename to load from
|
|
@@ -1411,10 +1484,12 @@ module Vips
|
|
|
1411
1484
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1412
1485
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1413
1486
|
|
|
1414
|
-
# @!method self.
|
|
1415
|
-
# Load
|
|
1487
|
+
# @!method self.jxlload(filename, **opts)
|
|
1488
|
+
# Load jpeg-xl image.
|
|
1416
1489
|
# @param filename [String] Filename to load from
|
|
1417
1490
|
# @param opts [Hash] Set of options
|
|
1491
|
+
# @option opts [Integer] :page First page to load
|
|
1492
|
+
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1418
1493
|
# @option opts [Boolean] :memory Force open via memory
|
|
1419
1494
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1420
1495
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1422,26 +1497,12 @@ module Vips
|
|
|
1422
1497
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1423
1498
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1424
1499
|
|
|
1425
|
-
# @!method self.
|
|
1426
|
-
# Load
|
|
1427
|
-
# @param
|
|
1428
|
-
# @param opts [Hash] Set of options
|
|
1429
|
-
# @option opts [Boolean] :memory Force open via memory
|
|
1430
|
-
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1431
|
-
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
1432
|
-
# @option opts [Boolean] :revalidate Don't use a cached result for this operation
|
|
1433
|
-
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1434
|
-
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1435
|
-
|
|
1436
|
-
# @!method self.openslideload(filename, **opts)
|
|
1437
|
-
# Load file with openslide.
|
|
1438
|
-
# @param filename [String] Filename to load from
|
|
1500
|
+
# @!method self.jxlload_buffer(buffer, **opts)
|
|
1501
|
+
# Load jpeg-xl image.
|
|
1502
|
+
# @param buffer [VipsBlob] Buffer to load from
|
|
1439
1503
|
# @param opts [Hash] Set of options
|
|
1440
|
-
# @option opts [Integer] :
|
|
1441
|
-
# @option opts [
|
|
1442
|
-
# @option opts [String] :associated Load this associated image
|
|
1443
|
-
# @option opts [Boolean] :attach_associated Attach all associated images
|
|
1444
|
-
# @option opts [Boolean] :rgb Output RGB (not RGBA)
|
|
1504
|
+
# @option opts [Integer] :page First page to load
|
|
1505
|
+
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1445
1506
|
# @option opts [Boolean] :memory Force open via memory
|
|
1446
1507
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1447
1508
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1449,15 +1510,12 @@ module Vips
|
|
|
1449
1510
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1450
1511
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1451
1512
|
|
|
1452
|
-
# @!method self.
|
|
1453
|
-
# Load
|
|
1513
|
+
# @!method self.jxlload_source(source, **opts)
|
|
1514
|
+
# Load jpeg-xl image.
|
|
1454
1515
|
# @param source [Vips::Source] Source to load from
|
|
1455
1516
|
# @param opts [Hash] Set of options
|
|
1456
|
-
# @option opts [Integer] :
|
|
1457
|
-
# @option opts [
|
|
1458
|
-
# @option opts [String] :associated Load this associated image
|
|
1459
|
-
# @option opts [Boolean] :attach_associated Attach all associated images
|
|
1460
|
-
# @option opts [Boolean] :rgb Output RGB (not RGBA)
|
|
1517
|
+
# @option opts [Integer] :page First page to load
|
|
1518
|
+
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1461
1519
|
# @option opts [Boolean] :memory Force open via memory
|
|
1462
1520
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1463
1521
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1510,12 +1568,17 @@ module Vips
|
|
|
1510
1568
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1511
1569
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1512
1570
|
|
|
1513
|
-
# @!method self.
|
|
1514
|
-
# Load
|
|
1571
|
+
# @!method self.pdfload(filename, **opts)
|
|
1572
|
+
# Load pdf from file (poppler).
|
|
1515
1573
|
# @param filename [String] Filename to load from
|
|
1516
1574
|
# @param opts [Hash] Set of options
|
|
1517
1575
|
# @option opts [Integer] :page First page to load
|
|
1518
1576
|
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1577
|
+
# @option opts [Float] :dpi DPI to render at
|
|
1578
|
+
# @option opts [Float] :scale Factor to scale by
|
|
1579
|
+
# @option opts [Array<Double>] :background Background colour
|
|
1580
|
+
# @option opts [String] :password Password to decrypt with
|
|
1581
|
+
# @option opts [Vips::ForeignPdfPageBox] :page_box The region of the page to render
|
|
1519
1582
|
# @option opts [Boolean] :memory Force open via memory
|
|
1520
1583
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1521
1584
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1523,12 +1586,17 @@ module Vips
|
|
|
1523
1586
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1524
1587
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1525
1588
|
|
|
1526
|
-
# @!method self.
|
|
1527
|
-
# Load
|
|
1589
|
+
# @!method self.pdfload_buffer(buffer, **opts)
|
|
1590
|
+
# Load pdf from buffer (poppler).
|
|
1528
1591
|
# @param buffer [VipsBlob] Buffer to load from
|
|
1529
1592
|
# @param opts [Hash] Set of options
|
|
1530
1593
|
# @option opts [Integer] :page First page to load
|
|
1531
1594
|
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1595
|
+
# @option opts [Float] :dpi DPI to render at
|
|
1596
|
+
# @option opts [Float] :scale Factor to scale by
|
|
1597
|
+
# @option opts [Array<Double>] :background Background colour
|
|
1598
|
+
# @option opts [String] :password Password to decrypt with
|
|
1599
|
+
# @option opts [Vips::ForeignPdfPageBox] :page_box The region of the page to render
|
|
1532
1600
|
# @option opts [Boolean] :memory Force open via memory
|
|
1533
1601
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1534
1602
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1536,12 +1604,17 @@ module Vips
|
|
|
1536
1604
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1537
1605
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1538
1606
|
|
|
1539
|
-
# @!method self.
|
|
1540
|
-
# Load
|
|
1607
|
+
# @!method self.pdfload_source(source, **opts)
|
|
1608
|
+
# Load pdf from source (poppler).
|
|
1541
1609
|
# @param source [Vips::Source] Source to load from
|
|
1542
1610
|
# @param opts [Hash] Set of options
|
|
1543
1611
|
# @option opts [Integer] :page First page to load
|
|
1544
1612
|
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1613
|
+
# @option opts [Float] :dpi DPI to render at
|
|
1614
|
+
# @option opts [Float] :scale Factor to scale by
|
|
1615
|
+
# @option opts [Array<Double>] :background Background colour
|
|
1616
|
+
# @option opts [String] :password Password to decrypt with
|
|
1617
|
+
# @option opts [Vips::ForeignPdfPageBox] :page_box The region of the page to render
|
|
1545
1618
|
# @option opts [Boolean] :memory Force open via memory
|
|
1546
1619
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1547
1620
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1549,16 +1622,13 @@ module Vips
|
|
|
1549
1622
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1550
1623
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1551
1624
|
|
|
1552
|
-
# @!method self.
|
|
1553
|
-
# Load
|
|
1625
|
+
# @!method self.magickload(filename, **opts)
|
|
1626
|
+
# Load file with imagemagick7.
|
|
1554
1627
|
# @param filename [String] Filename to load from
|
|
1555
1628
|
# @param opts [Hash] Set of options
|
|
1629
|
+
# @option opts [String] :density Canvas resolution for rendering vector formats like SVG
|
|
1556
1630
|
# @option opts [Integer] :page First page to load
|
|
1557
1631
|
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1558
|
-
# @option opts [Float] :dpi DPI to render at
|
|
1559
|
-
# @option opts [Float] :scale Factor to scale by
|
|
1560
|
-
# @option opts [Array<Double>] :background Background colour
|
|
1561
|
-
# @option opts [String] :password Password to decrypt with
|
|
1562
1632
|
# @option opts [Boolean] :memory Force open via memory
|
|
1563
1633
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1564
1634
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1566,16 +1636,13 @@ module Vips
|
|
|
1566
1636
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1567
1637
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1568
1638
|
|
|
1569
|
-
# @!method self.
|
|
1570
|
-
# Load
|
|
1639
|
+
# @!method self.magickload_buffer(buffer, **opts)
|
|
1640
|
+
# Load buffer with imagemagick7.
|
|
1571
1641
|
# @param buffer [VipsBlob] Buffer to load from
|
|
1572
1642
|
# @param opts [Hash] Set of options
|
|
1643
|
+
# @option opts [String] :density Canvas resolution for rendering vector formats like SVG
|
|
1573
1644
|
# @option opts [Integer] :page First page to load
|
|
1574
1645
|
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1575
|
-
# @option opts [Float] :dpi DPI to render at
|
|
1576
|
-
# @option opts [Float] :scale Factor to scale by
|
|
1577
|
-
# @option opts [Array<Double>] :background Background colour
|
|
1578
|
-
# @option opts [String] :password Password to decrypt with
|
|
1579
1646
|
# @option opts [Boolean] :memory Force open via memory
|
|
1580
1647
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1581
1648
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1583,16 +1650,13 @@ module Vips
|
|
|
1583
1650
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1584
1651
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1585
1652
|
|
|
1586
|
-
# @!method self.
|
|
1587
|
-
# Load
|
|
1653
|
+
# @!method self.magickload_source(source, **opts)
|
|
1654
|
+
# Load source with imagemagick7.
|
|
1588
1655
|
# @param source [Vips::Source] Source to load from
|
|
1589
1656
|
# @param opts [Hash] Set of options
|
|
1657
|
+
# @option opts [String] :density Canvas resolution for rendering vector formats like SVG
|
|
1590
1658
|
# @option opts [Integer] :page First page to load
|
|
1591
1659
|
# @option opts [Integer] :n Number of pages to load, -1 for all
|
|
1592
|
-
# @option opts [Float] :dpi DPI to render at
|
|
1593
|
-
# @option opts [Float] :scale Factor to scale by
|
|
1594
|
-
# @option opts [Array<Double>] :background Background colour
|
|
1595
|
-
# @option opts [String] :password Password to decrypt with
|
|
1596
1660
|
# @option opts [Boolean] :memory Force open via memory
|
|
1597
1661
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1598
1662
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1600,13 +1664,15 @@ module Vips
|
|
|
1600
1664
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1601
1665
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1602
1666
|
|
|
1603
|
-
# @!method self.
|
|
1604
|
-
# Load file with
|
|
1667
|
+
# @!method self.openslideload(filename, **opts)
|
|
1668
|
+
# Load file with openslide.
|
|
1605
1669
|
# @param filename [String] Filename to load from
|
|
1606
1670
|
# @param opts [Hash] Set of options
|
|
1607
|
-
# @option opts [
|
|
1608
|
-
# @option opts [
|
|
1609
|
-
# @option opts [
|
|
1671
|
+
# @option opts [Integer] :level Load this level from the file
|
|
1672
|
+
# @option opts [Boolean] :autocrop Crop to image bounds
|
|
1673
|
+
# @option opts [String] :associated Load this associated image
|
|
1674
|
+
# @option opts [Boolean] :attach_associated Attach all associated images
|
|
1675
|
+
# @option opts [Boolean] :rgb Output RGB (not RGBA)
|
|
1610
1676
|
# @option opts [Boolean] :memory Force open via memory
|
|
1611
1677
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1612
1678
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1614,13 +1680,15 @@ module Vips
|
|
|
1614
1680
|
# @option opts [Vips::ForeignFlags] :flags Output Flags for this file
|
|
1615
1681
|
# @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
|
|
1616
1682
|
|
|
1617
|
-
# @!method self.
|
|
1618
|
-
# Load
|
|
1619
|
-
# @param
|
|
1683
|
+
# @!method self.openslideload_source(source, **opts)
|
|
1684
|
+
# Load source with openslide.
|
|
1685
|
+
# @param source [Vips::Source] Source to load from
|
|
1620
1686
|
# @param opts [Hash] Set of options
|
|
1621
|
-
# @option opts [
|
|
1622
|
-
# @option opts [
|
|
1623
|
-
# @option opts [
|
|
1687
|
+
# @option opts [Integer] :level Load this level from the file
|
|
1688
|
+
# @option opts [Boolean] :autocrop Crop to image bounds
|
|
1689
|
+
# @option opts [String] :associated Load this associated image
|
|
1690
|
+
# @option opts [Boolean] :attach_associated Attach all associated images
|
|
1691
|
+
# @option opts [Boolean] :rgb Output RGB (not RGBA)
|
|
1624
1692
|
# @option opts [Boolean] :memory Force open via memory
|
|
1625
1693
|
# @option opts [Vips::Access] :access Required access pattern for this file
|
|
1626
1694
|
# @option opts [Vips::FailOn] :fail_on Error level to fail on
|
|
@@ -1827,6 +1895,38 @@ module Vips
|
|
|
1827
1895
|
# @option opts [String] :profile Filename of ICC profile to embed
|
|
1828
1896
|
# @return [nil]
|
|
1829
1897
|
|
|
1898
|
+
# @!method uhdrsave(filename, **opts)
|
|
1899
|
+
# Save image in ultrahdr format.
|
|
1900
|
+
# @param filename [String] Filename to save to
|
|
1901
|
+
# @param opts [Hash] Set of options
|
|
1902
|
+
# @option opts [Integer] :Q Q factor
|
|
1903
|
+
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
1904
|
+
# @option opts [Array<Double>] :background Background value
|
|
1905
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
|
1906
|
+
# @option opts [String] :profile Filename of ICC profile to embed
|
|
1907
|
+
# @return [nil]
|
|
1908
|
+
|
|
1909
|
+
# @!method uhdrsave_buffer(**opts)
|
|
1910
|
+
# Save image in ultrahdr format.
|
|
1911
|
+
# @param opts [Hash] Set of options
|
|
1912
|
+
# @option opts [Integer] :Q Q factor
|
|
1913
|
+
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
1914
|
+
# @option opts [Array<Double>] :background Background value
|
|
1915
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
|
1916
|
+
# @option opts [String] :profile Filename of ICC profile to embed
|
|
1917
|
+
# @return [VipsBlob] Buffer to save to
|
|
1918
|
+
|
|
1919
|
+
# @!method uhdrsave_target(target, **opts)
|
|
1920
|
+
# Save image in ultrahdr format.
|
|
1921
|
+
# @param target [Vips::Target] Target to save to
|
|
1922
|
+
# @param opts [Hash] Set of options
|
|
1923
|
+
# @option opts [Integer] :Q Q factor
|
|
1924
|
+
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
1925
|
+
# @option opts [Array<Double>] :background Background value
|
|
1926
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
|
1927
|
+
# @option opts [String] :profile Filename of ICC profile to embed
|
|
1928
|
+
# @return [nil]
|
|
1929
|
+
|
|
1830
1930
|
# @!method gifsave(filename, **opts)
|
|
1831
1931
|
# Save as gif.
|
|
1832
1932
|
# @param filename [String] Filename to save to
|
|
@@ -1957,7 +2057,7 @@ module Vips
|
|
|
1957
2057
|
# @param opts [Hash] Set of options
|
|
1958
2058
|
# @option opts [Integer] :compression Compression factor
|
|
1959
2059
|
# @option opts [Boolean] :interlace Interlace image
|
|
1960
|
-
# @option opts [Vips::ForeignPngFilter] :filter
|
|
2060
|
+
# @option opts [Vips::ForeignPngFilter] :filter libpng row filter flag(s)
|
|
1961
2061
|
# @option opts [Boolean] :palette Quantise to 8bpp palette
|
|
1962
2062
|
# @option opts [Integer] :Q Quantisation quality
|
|
1963
2063
|
# @option opts [Float] :dither Amount of dithering
|
|
@@ -1974,7 +2074,7 @@ module Vips
|
|
|
1974
2074
|
# @param opts [Hash] Set of options
|
|
1975
2075
|
# @option opts [Integer] :compression Compression factor
|
|
1976
2076
|
# @option opts [Boolean] :interlace Interlace image
|
|
1977
|
-
# @option opts [Vips::ForeignPngFilter] :filter
|
|
2077
|
+
# @option opts [Vips::ForeignPngFilter] :filter libpng row filter flag(s)
|
|
1978
2078
|
# @option opts [Boolean] :palette Quantise to 8bpp palette
|
|
1979
2079
|
# @option opts [Integer] :Q Quantisation quality
|
|
1980
2080
|
# @option opts [Float] :dither Amount of dithering
|
|
@@ -1992,7 +2092,7 @@ module Vips
|
|
|
1992
2092
|
# @param opts [Hash] Set of options
|
|
1993
2093
|
# @option opts [Integer] :compression Compression factor
|
|
1994
2094
|
# @option opts [Boolean] :interlace Interlace image
|
|
1995
|
-
# @option opts [Vips::ForeignPngFilter] :filter
|
|
2095
|
+
# @option opts [Vips::ForeignPngFilter] :filter libpng row filter flag(s)
|
|
1996
2096
|
# @option opts [Boolean] :palette Quantise to 8bpp palette
|
|
1997
2097
|
# @option opts [Integer] :Q Quantisation quality
|
|
1998
2098
|
# @option opts [Float] :dither Amount of dithering
|
|
@@ -2005,7 +2105,7 @@ module Vips
|
|
|
2005
2105
|
# @return [nil]
|
|
2006
2106
|
|
|
2007
2107
|
# @!method jpegsave(filename, **opts)
|
|
2008
|
-
# Save
|
|
2108
|
+
# Save as jpeg.
|
|
2009
2109
|
# @param filename [String] Filename to save to
|
|
2010
2110
|
# @param opts [Hash] Set of options
|
|
2011
2111
|
# @option opts [Integer] :Q Q factor
|
|
@@ -2024,7 +2124,7 @@ module Vips
|
|
|
2024
2124
|
# @return [nil]
|
|
2025
2125
|
|
|
2026
2126
|
# @!method jpegsave_buffer(**opts)
|
|
2027
|
-
# Save
|
|
2127
|
+
# Save as jpeg.
|
|
2028
2128
|
# @param opts [Hash] Set of options
|
|
2029
2129
|
# @option opts [Integer] :Q Q factor
|
|
2030
2130
|
# @option opts [Boolean] :optimize_coding Compute optimal Huffman coding tables
|
|
@@ -2042,7 +2142,7 @@ module Vips
|
|
|
2042
2142
|
# @return [VipsBlob] Buffer to save to
|
|
2043
2143
|
|
|
2044
2144
|
# @!method jpegsave_target(target, **opts)
|
|
2045
|
-
# Save
|
|
2145
|
+
# Save as jpeg.
|
|
2046
2146
|
# @param target [Vips::Target] Target to save to
|
|
2047
2147
|
# @param opts [Hash] Set of options
|
|
2048
2148
|
# @option opts [Integer] :Q Q factor
|
|
@@ -2084,6 +2184,7 @@ module Vips
|
|
|
2084
2184
|
# @param opts [Hash] Set of options
|
|
2085
2185
|
# @option opts [Integer] :Q Q factor
|
|
2086
2186
|
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2187
|
+
# @option opts [Boolean] :exact Preserve color values from transparent pixels
|
|
2087
2188
|
# @option opts [Vips::ForeignWebpPreset] :preset Preset for lossy compression
|
|
2088
2189
|
# @option opts [Boolean] :smart_subsample Enable high quality chroma subsampling
|
|
2089
2190
|
# @option opts [Boolean] :near_lossless Enable preprocessing in lossless mode (uses Q)
|
|
@@ -2107,6 +2208,7 @@ module Vips
|
|
|
2107
2208
|
# @param opts [Hash] Set of options
|
|
2108
2209
|
# @option opts [Integer] :Q Q factor
|
|
2109
2210
|
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2211
|
+
# @option opts [Boolean] :exact Preserve color values from transparent pixels
|
|
2110
2212
|
# @option opts [Vips::ForeignWebpPreset] :preset Preset for lossy compression
|
|
2111
2213
|
# @option opts [Boolean] :smart_subsample Enable high quality chroma subsampling
|
|
2112
2214
|
# @option opts [Boolean] :near_lossless Enable preprocessing in lossless mode (uses Q)
|
|
@@ -2131,6 +2233,7 @@ module Vips
|
|
|
2131
2233
|
# @param opts [Hash] Set of options
|
|
2132
2234
|
# @option opts [Integer] :Q Q factor
|
|
2133
2235
|
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2236
|
+
# @option opts [Boolean] :exact Preserve color values from transparent pixels
|
|
2134
2237
|
# @option opts [Vips::ForeignWebpPreset] :preset Preset for lossy compression
|
|
2135
2238
|
# @option opts [Boolean] :smart_subsample Enable high quality chroma subsampling
|
|
2136
2239
|
# @option opts [Boolean] :near_lossless Enable preprocessing in lossless mode (uses Q)
|
|
@@ -2154,6 +2257,7 @@ module Vips
|
|
|
2154
2257
|
# @param opts [Hash] Set of options
|
|
2155
2258
|
# @option opts [Integer] :Q Q factor
|
|
2156
2259
|
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2260
|
+
# @option opts [Boolean] :exact Preserve color values from transparent pixels
|
|
2157
2261
|
# @option opts [Vips::ForeignWebpPreset] :preset Preset for lossy compression
|
|
2158
2262
|
# @option opts [Boolean] :smart_subsample Enable high quality chroma subsampling
|
|
2159
2263
|
# @option opts [Boolean] :near_lossless Enable preprocessing in lossless mode (uses Q)
|
|
@@ -2271,10 +2375,47 @@ module Vips
|
|
|
2271
2375
|
# @option opts [String] :profile Filename of ICC profile to embed
|
|
2272
2376
|
# @return [nil]
|
|
2273
2377
|
|
|
2274
|
-
# @!method
|
|
2275
|
-
# Save image
|
|
2378
|
+
# @!method jxlsave(filename, **opts)
|
|
2379
|
+
# Save image in jpeg-xl format.
|
|
2276
2380
|
# @param filename [String] Filename to save to
|
|
2277
2381
|
# @param opts [Hash] Set of options
|
|
2382
|
+
# @option opts [Integer] :tier Decode speed tier
|
|
2383
|
+
# @option opts [Float] :distance Target butteraugli distance
|
|
2384
|
+
# @option opts [Integer] :effort Encoding effort
|
|
2385
|
+
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2386
|
+
# @option opts [Integer] :Q Quality factor
|
|
2387
|
+
# @option opts [Integer] :bitdepth Bit depth
|
|
2388
|
+
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2389
|
+
# @option opts [Array<Double>] :background Background value
|
|
2390
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
|
2391
|
+
# @option opts [String] :profile Filename of ICC profile to embed
|
|
2392
|
+
# @return [nil]
|
|
2393
|
+
|
|
2394
|
+
# @!method jxlsave_buffer(**opts)
|
|
2395
|
+
# Save image in jpeg-xl format.
|
|
2396
|
+
# @param opts [Hash] Set of options
|
|
2397
|
+
# @option opts [Integer] :tier Decode speed tier
|
|
2398
|
+
# @option opts [Float] :distance Target butteraugli distance
|
|
2399
|
+
# @option opts [Integer] :effort Encoding effort
|
|
2400
|
+
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2401
|
+
# @option opts [Integer] :Q Quality factor
|
|
2402
|
+
# @option opts [Integer] :bitdepth Bit depth
|
|
2403
|
+
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2404
|
+
# @option opts [Array<Double>] :background Background value
|
|
2405
|
+
# @option opts [Integer] :page_height Set page height for multipage save
|
|
2406
|
+
# @option opts [String] :profile Filename of ICC profile to embed
|
|
2407
|
+
# @return [VipsBlob] Buffer to save to
|
|
2408
|
+
|
|
2409
|
+
# @!method jxlsave_target(target, **opts)
|
|
2410
|
+
# Save image in jpeg-xl format.
|
|
2411
|
+
# @param target [Vips::Target] Target to save to
|
|
2412
|
+
# @param opts [Hash] Set of options
|
|
2413
|
+
# @option opts [Integer] :tier Decode speed tier
|
|
2414
|
+
# @option opts [Float] :distance Target butteraugli distance
|
|
2415
|
+
# @option opts [Integer] :effort Encoding effort
|
|
2416
|
+
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2417
|
+
# @option opts [Integer] :Q Quality factor
|
|
2418
|
+
# @option opts [Integer] :bitdepth Bit depth
|
|
2278
2419
|
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2279
2420
|
# @option opts [Array<Double>] :background Background value
|
|
2280
2421
|
# @option opts [Integer] :page_height Set page height for multipage save
|
|
@@ -2292,6 +2433,7 @@ module Vips
|
|
|
2292
2433
|
# @option opts [Integer] :effort CPU effort
|
|
2293
2434
|
# @option opts [Vips::ForeignSubsample] :subsample_mode Select chroma subsample operation mode
|
|
2294
2435
|
# @option opts [Vips::ForeignHeifEncoder] :encoder Select encoder to use
|
|
2436
|
+
# @option opts [String] :tune Tuning parameters
|
|
2295
2437
|
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2296
2438
|
# @option opts [Array<Double>] :background Background value
|
|
2297
2439
|
# @option opts [Integer] :page_height Set page height for multipage save
|
|
@@ -2308,6 +2450,7 @@ module Vips
|
|
|
2308
2450
|
# @option opts [Integer] :effort CPU effort
|
|
2309
2451
|
# @option opts [Vips::ForeignSubsample] :subsample_mode Select chroma subsample operation mode
|
|
2310
2452
|
# @option opts [Vips::ForeignHeifEncoder] :encoder Select encoder to use
|
|
2453
|
+
# @option opts [String] :tune Tuning parameters
|
|
2311
2454
|
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2312
2455
|
# @option opts [Array<Double>] :background Background value
|
|
2313
2456
|
# @option opts [Integer] :page_height Set page height for multipage save
|
|
@@ -2325,50 +2468,7 @@ module Vips
|
|
|
2325
2468
|
# @option opts [Integer] :effort CPU effort
|
|
2326
2469
|
# @option opts [Vips::ForeignSubsample] :subsample_mode Select chroma subsample operation mode
|
|
2327
2470
|
# @option opts [Vips::ForeignHeifEncoder] :encoder Select encoder to use
|
|
2328
|
-
# @option opts [
|
|
2329
|
-
# @option opts [Array<Double>] :background Background value
|
|
2330
|
-
# @option opts [Integer] :page_height Set page height for multipage save
|
|
2331
|
-
# @option opts [String] :profile Filename of ICC profile to embed
|
|
2332
|
-
# @return [nil]
|
|
2333
|
-
|
|
2334
|
-
# @!method jxlsave(filename, **opts)
|
|
2335
|
-
# Save image in jpeg-xl format.
|
|
2336
|
-
# @param filename [String] Filename to save to
|
|
2337
|
-
# @param opts [Hash] Set of options
|
|
2338
|
-
# @option opts [Integer] :tier Decode speed tier
|
|
2339
|
-
# @option opts [Float] :distance Target butteraugli distance
|
|
2340
|
-
# @option opts [Integer] :effort Encoding effort
|
|
2341
|
-
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2342
|
-
# @option opts [Integer] :Q Quality factor
|
|
2343
|
-
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2344
|
-
# @option opts [Array<Double>] :background Background value
|
|
2345
|
-
# @option opts [Integer] :page_height Set page height for multipage save
|
|
2346
|
-
# @option opts [String] :profile Filename of ICC profile to embed
|
|
2347
|
-
# @return [nil]
|
|
2348
|
-
|
|
2349
|
-
# @!method jxlsave_buffer(**opts)
|
|
2350
|
-
# Save image in jpeg-xl format.
|
|
2351
|
-
# @param opts [Hash] Set of options
|
|
2352
|
-
# @option opts [Integer] :tier Decode speed tier
|
|
2353
|
-
# @option opts [Float] :distance Target butteraugli distance
|
|
2354
|
-
# @option opts [Integer] :effort Encoding effort
|
|
2355
|
-
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2356
|
-
# @option opts [Integer] :Q Quality factor
|
|
2357
|
-
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2358
|
-
# @option opts [Array<Double>] :background Background value
|
|
2359
|
-
# @option opts [Integer] :page_height Set page height for multipage save
|
|
2360
|
-
# @option opts [String] :profile Filename of ICC profile to embed
|
|
2361
|
-
# @return [VipsBlob] Buffer to save to
|
|
2362
|
-
|
|
2363
|
-
# @!method jxlsave_target(target, **opts)
|
|
2364
|
-
# Save image in jpeg-xl format.
|
|
2365
|
-
# @param target [Vips::Target] Target to save to
|
|
2366
|
-
# @param opts [Hash] Set of options
|
|
2367
|
-
# @option opts [Integer] :tier Decode speed tier
|
|
2368
|
-
# @option opts [Float] :distance Target butteraugli distance
|
|
2369
|
-
# @option opts [Integer] :effort Encoding effort
|
|
2370
|
-
# @option opts [Boolean] :lossless Enable lossless compression
|
|
2371
|
-
# @option opts [Integer] :Q Quality factor
|
|
2471
|
+
# @option opts [String] :tune Tuning parameters
|
|
2372
2472
|
# @option opts [Vips::ForeignKeep] :keep Which metadata to retain
|
|
2373
2473
|
# @option opts [Array<Double>] :background Background value
|
|
2374
2474
|
# @option opts [Integer] :page_height Set page height for multipage save
|
|
@@ -2589,6 +2689,26 @@ module Vips
|
|
|
2589
2689
|
# @option opts [Vips::Interpretation] :source_space Source color space
|
|
2590
2690
|
# @return [Vips::Image] Output image
|
|
2591
2691
|
|
|
2692
|
+
# @!method Oklab2Oklch(**opts)
|
|
2693
|
+
# Transform oklab to oklch.
|
|
2694
|
+
# @param opts [Hash] Set of options
|
|
2695
|
+
# @return [Vips::Image] Output image
|
|
2696
|
+
|
|
2697
|
+
# @!method Oklch2Oklab(**opts)
|
|
2698
|
+
# Transform oklch to oklab.
|
|
2699
|
+
# @param opts [Hash] Set of options
|
|
2700
|
+
# @return [Vips::Image] Output image
|
|
2701
|
+
|
|
2702
|
+
# @!method Oklab2XYZ(**opts)
|
|
2703
|
+
# Transform oklab to xyz.
|
|
2704
|
+
# @param opts [Hash] Set of options
|
|
2705
|
+
# @return [Vips::Image] Output image
|
|
2706
|
+
|
|
2707
|
+
# @!method XYZ2Oklab(**opts)
|
|
2708
|
+
# Transform xyz to oklab.
|
|
2709
|
+
# @param opts [Hash] Set of options
|
|
2710
|
+
# @return [Vips::Image] Output image
|
|
2711
|
+
|
|
2592
2712
|
# @!method Lab2XYZ(**opts)
|
|
2593
2713
|
# Transform cielab to xyz.
|
|
2594
2714
|
# @param opts [Hash] Set of options
|
|
@@ -2745,6 +2865,11 @@ module Vips
|
|
|
2745
2865
|
# @option opts [Integer] :depth Output device space depth in bits
|
|
2746
2866
|
# @return [Vips::Image] Output image
|
|
2747
2867
|
|
|
2868
|
+
# @!method uhdr2scRGB(**opts)
|
|
2869
|
+
# Transform uhdr to scrgb.
|
|
2870
|
+
# @param opts [Hash] Set of options
|
|
2871
|
+
# @return [Vips::Image] Output image
|
|
2872
|
+
|
|
2748
2873
|
# @!method dE76(right, **opts)
|
|
2749
2874
|
# Calculate de76.
|
|
2750
2875
|
# @param right [Vips::Image] Right-hand input image
|
data/lib/vips/mutableimage.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Vips
|
|
|
12
12
|
# {Vips::Image#mutate}.
|
|
13
13
|
class MutableImage < Vips::Object
|
|
14
14
|
extend Forwardable
|
|
15
|
+
|
|
15
16
|
alias_method :parent_get_typeof, :get_typeof
|
|
16
17
|
def_instance_delegators :@image, :width, :height, :bands, :format,
|
|
17
18
|
:interpretation, :filename, :xoffset, :yoffset, :xres, :yres, :size,
|
data/lib/vips/version.rb
CHANGED
data/lib/vips.rb
CHANGED
|
@@ -23,13 +23,15 @@ require "logger"
|
|
|
23
23
|
# windows:
|
|
24
24
|
# The ABI number must be included, but with a hyphen. ffi does not add a
|
|
25
25
|
# "lib" prefix or a ".dll" suffix.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
module FFI
|
|
27
|
+
def self.library_name(name, abi_number)
|
|
28
|
+
if Platform.windows?
|
|
29
|
+
"lib#{name}-#{abi_number}.dll"
|
|
30
|
+
elsif Platform.mac?
|
|
31
|
+
"#{name}.#{abi_number}"
|
|
32
|
+
else
|
|
33
|
+
"#{name}.so.#{abi_number}"
|
|
34
|
+
end
|
|
33
35
|
end
|
|
34
36
|
end
|
|
35
37
|
|
|
@@ -43,7 +45,7 @@ end
|
|
|
43
45
|
module Vips
|
|
44
46
|
extend FFI::Library
|
|
45
47
|
|
|
46
|
-
ffi_lib library_name("vips", 42)
|
|
48
|
+
ffi_lib FFI.library_name("vips", 42)
|
|
47
49
|
|
|
48
50
|
begin
|
|
49
51
|
attach_function :g_malloc, [:size_t], :pointer
|
|
@@ -67,9 +69,9 @@ module GLib
|
|
|
67
69
|
extend FFI::Library
|
|
68
70
|
|
|
69
71
|
if Vips.unified?
|
|
70
|
-
ffi_lib library_name("vips", 42)
|
|
72
|
+
ffi_lib FFI.library_name("vips", 42)
|
|
71
73
|
else
|
|
72
|
-
ffi_lib library_name("glib-2.0", 0)
|
|
74
|
+
ffi_lib FFI.library_name("glib-2.0", 0)
|
|
73
75
|
end
|
|
74
76
|
|
|
75
77
|
attach_function :g_malloc, [:size_t], :pointer
|
|
@@ -163,9 +165,9 @@ module GObject
|
|
|
163
165
|
extend FFI::Library
|
|
164
166
|
|
|
165
167
|
if Vips.unified?
|
|
166
|
-
ffi_lib library_name("vips", 42)
|
|
168
|
+
ffi_lib FFI.library_name("vips", 42)
|
|
167
169
|
else
|
|
168
|
-
ffi_lib library_name("gobject-2.0", 0)
|
|
170
|
+
ffi_lib FFI.library_name("gobject-2.0", 0)
|
|
169
171
|
end
|
|
170
172
|
|
|
171
173
|
# we can't just use ulong, windows has different int sizing rules
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-vips
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Cupitt
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: ffi
|
|
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
240
240
|
- !ruby/object:Gem::Version
|
|
241
241
|
version: '0'
|
|
242
242
|
requirements: []
|
|
243
|
-
rubygems_version: 3.6.
|
|
243
|
+
rubygems_version: 3.6.7
|
|
244
244
|
specification_version: 4
|
|
245
245
|
summary: A fast image processing library with low memory needs
|
|
246
246
|
test_files: []
|