ruby-vips 2.1.2 → 2.1.3
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/CHANGELOG.md +4 -0
- data/README.md +8 -7
- data/VERSION +1 -1
- data/example/inheritance_with_refcount.rb +11 -3
- data/lib/vips.rb +6 -1
- data/lib/vips/image.rb +1 -1
- data/lib/vips/object.rb +4 -10
- data/lib/vips/version.rb +1 -1
- 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: 5e9c2a25819da8d93bb3cd90e9c409d475090b789bc2c1f4e30389ad665cb579
|
4
|
+
data.tar.gz: 3d92ec1b0020802e05df6c632c135c8bae07478afa44a76ef2b8d3c9e5466563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af7c18265746e1553e321bc2410fd37d8c1e627306bf347768893c5d0a6fa57f4663ec80c7c2d877c3a49382bfb49b45759c4af3ee181717f4eecc78f66bab4
|
7
|
+
data.tar.gz: 792c89c07bda9f21e22e0938db16f9182b055b803d41dde4846f804dddc7d3f1c44469ced01f1fba82982b06c204cf22e93ed6510bdb6cac4a061193e085c6b7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -6,12 +6,13 @@
|
|
6
6
|
This gem is a Ruby binding for the [libvips image processing
|
7
7
|
library](https://libvips.github.io/libvips).
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
image
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
libvips is a [demand-driven, horizontally
|
10
|
+
threaded](https://github.com/libvips/libvips/wiki/Why-is-libvips-quick)
|
11
|
+
image processing library. Compared to similar
|
12
|
+
libraries, [libvips runs quickly and uses little
|
13
|
+
memory](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).
|
14
|
+
libvips is licensed under the [LGPL
|
15
|
+
2.1+](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html).
|
15
16
|
|
16
17
|
## Requirements
|
17
18
|
|
@@ -25,7 +26,7 @@ and because it doesn't need to keep entire images in memory, it's light.
|
|
25
26
|
|
26
27
|
## Install
|
27
28
|
|
28
|
-
|
29
|
+
[Install libvips](https://libvips.github.io/libvips/install.html), then:
|
29
30
|
|
30
31
|
```
|
31
32
|
$ gem install ruby-vips
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.3
|
@@ -132,8 +132,12 @@ module GLib
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
-
#
|
136
|
-
|
135
|
+
# we can't just use ulong, windows has different int sizing rules
|
136
|
+
if FFI::Platform::ADDRESS_SIZE == 64
|
137
|
+
typedef :uint64, :GType
|
138
|
+
else
|
139
|
+
typedef :uint32, :GType
|
140
|
+
end
|
137
141
|
end
|
138
142
|
|
139
143
|
module Vips
|
@@ -144,7 +148,11 @@ module Vips
|
|
144
148
|
GLib.set_log_domain(LOG_DOMAIN)
|
145
149
|
|
146
150
|
# need to repeat this
|
147
|
-
|
151
|
+
if FFI::Platform::ADDRESS_SIZE == 64
|
152
|
+
typedef :uint64, :GType
|
153
|
+
else
|
154
|
+
typedef :uint32, :GType
|
155
|
+
end
|
148
156
|
|
149
157
|
attach_function :vips_init, [:string], :int
|
150
158
|
attach_function :vips_shutdown, [], :void
|
data/lib/vips.rb
CHANGED
@@ -575,7 +575,12 @@ module Vips
|
|
575
575
|
LOG_DOMAIN = "VIPS"
|
576
576
|
GLib.set_log_domain LOG_DOMAIN
|
577
577
|
|
578
|
-
|
578
|
+
# we can't just use ulong, windows has different int sizing rules
|
579
|
+
if FFI::Platform::ADDRESS_SIZE == 64
|
580
|
+
typedef :uint64, :GType
|
581
|
+
else
|
582
|
+
typedef :uint32, :GType
|
583
|
+
end
|
579
584
|
|
580
585
|
attach_function :vips_error_buffer, [], :string
|
581
586
|
attach_function :vips_error_clear, [], :void
|
data/lib/vips/image.rb
CHANGED
@@ -549,7 +549,7 @@ module Vips
|
|
549
549
|
pixel = (Vips::Image.black(1, 1) + value).cast(format)
|
550
550
|
image = pixel.embed 0, 0, width, height, extend: :copy
|
551
551
|
image.copy interpretation: interpretation, xres: xres, yres: yres,
|
552
|
-
|
552
|
+
xoffset: xoffset, yoffset: yoffset
|
553
553
|
end
|
554
554
|
|
555
555
|
# Write this image to a file. Save options may be encoded in the
|
data/lib/vips/object.rb
CHANGED
@@ -64,11 +64,8 @@ module Vips
|
|
64
64
|
|
65
65
|
MARSHAL_PROGRESS = proc do |handler|
|
66
66
|
FFI::Function.new(:void, [:pointer, :pointer, :pointer]) do |vi, prog, cb|
|
67
|
-
|
68
|
-
|
69
|
-
rescue Exception => e
|
70
|
-
puts "progress: #{e}"
|
71
|
-
end
|
67
|
+
# this can't throw an exception, so no catch is necessary
|
68
|
+
handler.call(Progress.new(prog))
|
72
69
|
end
|
73
70
|
end
|
74
71
|
|
@@ -113,11 +110,8 @@ module Vips
|
|
113
110
|
|
114
111
|
MARSHAL_FINISH = proc do |handler|
|
115
112
|
FFI::Function.new(:void, [:pointer, :pointer]) do |i, cb|
|
116
|
-
|
117
|
-
|
118
|
-
rescue Exception => e
|
119
|
-
puts "finish: #{e}"
|
120
|
-
end
|
113
|
+
# this can't throw an exception, so no catch is necessary
|
114
|
+
handler.call
|
121
115
|
end
|
122
116
|
end
|
123
117
|
|
data/lib/vips/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-vips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Cupitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
rubygems_version: 3.
|
207
|
+
rubygems_version: 3.2.5
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: A fast image processing library with low memory needs
|