ruby-vips 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 267111867f885404762f693512589879bf5f1a47ef0711e368aa6bf57acdb78d
4
- data.tar.gz: 80b65db37293a9054f508a786f841fbce6f5638cd9e237cba68074cdf3455420
3
+ metadata.gz: 5e9c2a25819da8d93bb3cd90e9c409d475090b789bc2c1f4e30389ad665cb579
4
+ data.tar.gz: 3d92ec1b0020802e05df6c632c135c8bae07478afa44a76ef2b8d3c9e5466563
5
5
  SHA512:
6
- metadata.gz: 62c7552e7372e35005cc2212d05471c30194511a06065c658aca6b63b5a1bdfe7b3fecece9231b533d274956981bc65e61c7fc5d4d3bc64268e723f10425c80c
7
- data.tar.gz: a908583f08ed891280aaf94aa57275b04038b831027954298f7a8cb98e85c90bc3f61fb276e89f159bb874404022b015b3144e899f6c41170ed9ae082bc97903
6
+ metadata.gz: 1af7c18265746e1553e321bc2410fd37d8c1e627306bf347768893c5d0a6fa57f4663ec80c7c2d877c3a49382bfb49b45759c4af3ee181717f4eecc78f66bab4
7
+ data.tar.gz: 792c89c07bda9f21e22e0938db16f9182b055b803d41dde4846f804dddc7d3f1c44469ced01f1fba82982b06c204cf22e93ed6510bdb6cac4a061193e085c6b7
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## Version 2.1.3 (2021-8-23)
6
+
7
+ * fix a gtype size error on win64 [danini-the-panini]
8
+
5
9
  ## Version 2.1.2 (2021-5-3)
6
10
 
7
11
  * allow `FFI::Pointer` as an argument to `new_from_memory` etc. [sled]
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
- Programs that use `ruby-vips` don't manipulate images directly, instead
10
- they create pipelines of image processing operations building on a source
11
- image. When the end of the pipe is connected to a destination, the whole
12
- pipeline executes at once, streaming the image in parallel from source to
13
- destination a section at a time. Because `ruby-vips` is parallel, it's quick,
14
- and because it doesn't need to keep entire images in memory, it's light.
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
- It's just:
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.2
1
+ 2.1.3
@@ -132,8 +132,12 @@ module GLib
132
132
  end
133
133
  end
134
134
 
135
- # :gtype will usually be 64-bit, but will be 32-bit on 32-bit Windows
136
- typedef :ulong, :GType
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
- typedef :ulong, :GType
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
- typedef :ulong, :GType
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
- xoffset: xoffset, yoffset: yoffset
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
- begin
68
- handler.call(Progress.new(prog))
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
- begin
117
- handler.call
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
@@ -1,3 +1,3 @@
1
1
  module Vips
2
- VERSION = "2.1.2"
2
+ VERSION = "2.1.3"
3
3
  end
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.2
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-05-06 00:00:00.000000000 Z
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.1.2
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