ruby-vips 2.2.4 → 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 +15 -2
- data/README.md +2 -2
- data/VERSION +1 -1
- data/example/inheritance_with_refcount.rb +3 -0
- data/lib/vips/combine.rb +10 -0
- data/lib/vips/fail_on.rb +15 -0
- data/lib/vips/foreign_dz_container.rb +10 -0
- data/lib/vips/foreign_dz_depth.rb +10 -0
- data/lib/vips/foreign_dz_layout.rb +12 -0
- data/lib/vips/foreign_heif_compression.rb +11 -0
- data/lib/vips/foreign_heif_encoder.rb +11 -0
- data/lib/vips/foreign_keep.rb +14 -0
- data/lib/vips/foreign_png_filter.rb +13 -0
- data/lib/vips/foreign_ppm_format.rb +12 -0
- data/lib/vips/foreign_subsample.rb +10 -0
- data/lib/vips/foreign_tiff_compression.rb +16 -0
- data/lib/vips/foreign_tiff_predictor.rb +10 -0
- data/lib/vips/foreign_tiff_resunit.rb +9 -0
- data/lib/vips/foreign_webp_preset.rb +13 -0
- data/lib/vips/gvalue.rb +41 -3
- data/lib/vips/image.rb +40 -15
- data/lib/vips/intent.rb +12 -0
- data/lib/vips/interpolate.rb +1 -1
- data/lib/vips/interpretation.rb +4 -3
- data/lib/vips/kernel.rb +9 -6
- data/lib/vips/methods.rb +241 -116
- data/lib/vips/mutableimage.rb +1 -0
- data/lib/vips/object.rb +1 -0
- data/lib/vips/operation_morphology.rb +9 -0
- data/lib/vips/pcs.rb +10 -0
- data/lib/vips/precision.rb +10 -0
- data/lib/vips/region_shrink.rb +13 -0
- data/lib/vips/sdf_shape.rb +11 -0
- data/lib/vips/text_wrap.rb +11 -0
- data/lib/vips/version.rb +1 -1
- data/lib/vips.rb +28 -13
- metadata +25 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Vips
|
|
2
|
+
# The SDF to generate, see {Image.sdf}.
|
|
3
|
+
#
|
|
4
|
+
# * `:circle` a circle at @a, radius @r
|
|
5
|
+
# * `:box` a box from @a to @b
|
|
6
|
+
# * `:rounded_box` a box with rounded @corners from @a to @b
|
|
7
|
+
# * `:line` a line from @a to @b
|
|
8
|
+
|
|
9
|
+
class SdfShape < Symbol
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Vips
|
|
2
|
+
# Sets the word wrapping style for {Image#text} when used with a
|
|
3
|
+
# maximum width.
|
|
4
|
+
#
|
|
5
|
+
# * `:char` wrap at character boundaries
|
|
6
|
+
# * `:word_char` wrap at word boundaries, but fall back to character boundaries if there is not enough space for a full word
|
|
7
|
+
# * `:none` no wrapping
|
|
8
|
+
|
|
9
|
+
class TextWrap < Symbol
|
|
10
|
+
end
|
|
11
|
+
end
|
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
|
|
@@ -443,7 +445,7 @@ require "vips/gvalue"
|
|
|
443
445
|
# It examines libvips and writes a summary of each operation and the arguments
|
|
444
446
|
# and options that that operation expects.
|
|
445
447
|
#
|
|
446
|
-
# Use the [C API
|
|
448
|
+
# Use the [C API docs](https://www.libvips.org/API/current/)
|
|
447
449
|
# for more detail.
|
|
448
450
|
#
|
|
449
451
|
# # Enums
|
|
@@ -452,6 +454,19 @@ require "vips/gvalue"
|
|
|
452
454
|
# like `:uchar`. They are documented as a set of classes for convenience, see
|
|
453
455
|
# {Vips::BandFormat}, for example.
|
|
454
456
|
#
|
|
457
|
+
# # Flags
|
|
458
|
+
#
|
|
459
|
+
# Some operations take a set of flags as an argument, for example
|
|
460
|
+
# {Image#pngsave} can be given a set of filters to use. These are documented
|
|
461
|
+
# as a set of classes, see {Vips::ForeignPngFilter}, for
|
|
462
|
+
# example.
|
|
463
|
+
#
|
|
464
|
+
# You can set flag arguments with an array of symbols, perhaps:
|
|
465
|
+
#
|
|
466
|
+
# ```ruby
|
|
467
|
+
# image.pngsave "x.png", filter: [:sub, :up]
|
|
468
|
+
# ```
|
|
469
|
+
#
|
|
455
470
|
# # Draw operations
|
|
456
471
|
#
|
|
457
472
|
# There are two ways of calling the libvips draw operations, like
|
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
|
|
@@ -163,13 +163,29 @@ files:
|
|
|
163
163
|
- lib/vips/bandformat.rb
|
|
164
164
|
- lib/vips/blend_mode.rb
|
|
165
165
|
- lib/vips/coding.rb
|
|
166
|
+
- lib/vips/combine.rb
|
|
166
167
|
- lib/vips/compass_direction.rb
|
|
167
168
|
- lib/vips/connection.rb
|
|
168
169
|
- lib/vips/direction.rb
|
|
169
170
|
- lib/vips/extend.rb
|
|
171
|
+
- lib/vips/fail_on.rb
|
|
172
|
+
- lib/vips/foreign_dz_container.rb
|
|
173
|
+
- lib/vips/foreign_dz_depth.rb
|
|
174
|
+
- lib/vips/foreign_dz_layout.rb
|
|
175
|
+
- lib/vips/foreign_heif_compression.rb
|
|
176
|
+
- lib/vips/foreign_heif_encoder.rb
|
|
177
|
+
- lib/vips/foreign_keep.rb
|
|
178
|
+
- lib/vips/foreign_png_filter.rb
|
|
179
|
+
- lib/vips/foreign_ppm_format.rb
|
|
180
|
+
- lib/vips/foreign_subsample.rb
|
|
181
|
+
- lib/vips/foreign_tiff_compression.rb
|
|
182
|
+
- lib/vips/foreign_tiff_predictor.rb
|
|
183
|
+
- lib/vips/foreign_tiff_resunit.rb
|
|
184
|
+
- lib/vips/foreign_webp_preset.rb
|
|
170
185
|
- lib/vips/gobject.rb
|
|
171
186
|
- lib/vips/gvalue.rb
|
|
172
187
|
- lib/vips/image.rb
|
|
188
|
+
- lib/vips/intent.rb
|
|
173
189
|
- lib/vips/interesting.rb
|
|
174
190
|
- lib/vips/interpolate.rb
|
|
175
191
|
- lib/vips/interpretation.rb
|
|
@@ -178,6 +194,7 @@ files:
|
|
|
178
194
|
- lib/vips/mutableimage.rb
|
|
179
195
|
- lib/vips/object.rb
|
|
180
196
|
- lib/vips/operation.rb
|
|
197
|
+
- lib/vips/operation_morphology.rb
|
|
181
198
|
- lib/vips/operationboolean.rb
|
|
182
199
|
- lib/vips/operationcomplex.rb
|
|
183
200
|
- lib/vips/operationcomplex2.rb
|
|
@@ -186,12 +203,17 @@ files:
|
|
|
186
203
|
- lib/vips/operationmath2.rb
|
|
187
204
|
- lib/vips/operationrelational.rb
|
|
188
205
|
- lib/vips/operationround.rb
|
|
206
|
+
- lib/vips/pcs.rb
|
|
207
|
+
- lib/vips/precision.rb
|
|
189
208
|
- lib/vips/region.rb
|
|
209
|
+
- lib/vips/region_shrink.rb
|
|
210
|
+
- lib/vips/sdf_shape.rb
|
|
190
211
|
- lib/vips/size.rb
|
|
191
212
|
- lib/vips/source.rb
|
|
192
213
|
- lib/vips/sourcecustom.rb
|
|
193
214
|
- lib/vips/target.rb
|
|
194
215
|
- lib/vips/targetcustom.rb
|
|
216
|
+
- lib/vips/text_wrap.rb
|
|
195
217
|
- lib/vips/version.rb
|
|
196
218
|
- ruby-vips.gemspec
|
|
197
219
|
homepage: http://github.com/libvips/ruby-vips
|
|
@@ -218,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
218
240
|
- !ruby/object:Gem::Version
|
|
219
241
|
version: '0'
|
|
220
242
|
requirements: []
|
|
221
|
-
rubygems_version: 3.6.
|
|
243
|
+
rubygems_version: 3.6.7
|
|
222
244
|
specification_version: 4
|
|
223
245
|
summary: A fast image processing library with low memory needs
|
|
224
246
|
test_files: []
|