ruby-vips 2.0.12 → 2.0.13
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 +5 -5
- data/.travis.yml +7 -11
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/vips/image.rb +17 -9
- data/lib/vips/operation.rb +2 -0
- data/lib/vips/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e509c29533461f0e4654d1dd116f61b033d589d9f78924bd197cb303fc0d9d0e
|
4
|
+
data.tar.gz: bf53c311ee52c198b3288e6b11d773dda21403355b3704ecbc4652ce16d51d53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fcdf3c4f3d66ac3550d17bc45606831a3337a41d8b5af151ff6103bdf0e891036e9ff568930e29f3e045543719801e48ec938310809c4e98af2f4f7ac695031
|
7
|
+
data.tar.gz: 2ddd68fe1e1f9dcc2174757658d145d5d9777a18c27436758030e376049e956860f6b5d454fe2f1dc1728b17b27cbcf37e1fa3d301edee23a9a7b17f4d0ba874
|
data/.travis.yml
CHANGED
@@ -1,40 +1,36 @@
|
|
1
|
+
dist: trusty
|
1
2
|
sudo: false
|
2
3
|
|
3
4
|
env:
|
4
5
|
global:
|
5
6
|
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
6
7
|
- VIPS_VERSION_MAJOR=8
|
7
|
-
- VIPS_VERSION_MINOR=
|
8
|
-
- VIPS_VERSION_MICRO=
|
8
|
+
- VIPS_VERSION_MINOR=6
|
9
|
+
- VIPS_VERSION_MICRO=4
|
9
10
|
- PATH=$HOME/vips/bin:$PATH
|
10
11
|
- LD_LIBRARY_PATH=$HOME/vips/lib:$LD_LIBRARY_PATH
|
11
12
|
- PKG_CONFIG_PATH=$HOME/vips/lib/pkgconfig:$PKG_CONFIG_PATH
|
12
13
|
|
13
|
-
dist: trusty
|
14
|
-
|
15
14
|
addons:
|
16
15
|
apt:
|
17
16
|
packages:
|
18
17
|
- libexpat1-dev
|
19
18
|
- gettext
|
19
|
+
- libglib2.0-dev
|
20
|
+
- liborc-0.4-dev
|
21
|
+
- libfftw3-dev
|
20
22
|
- liblcms2-dev
|
21
23
|
- libmagickwand-dev
|
22
24
|
- libopenexr-dev
|
23
25
|
- libcfitsio3-dev
|
24
26
|
- libgif-dev
|
25
|
-
- libgs-dev
|
26
27
|
- libgsf-1-dev
|
27
28
|
- libmatio-dev
|
28
29
|
- libopenslide-dev
|
29
|
-
- liborc-0.4-dev
|
30
30
|
- libpango1.0-dev
|
31
31
|
- libpoppler-glib-dev
|
32
32
|
- librsvg2-dev
|
33
33
|
- libwebp-dev
|
34
|
-
# missing on trusty, unfortunately
|
35
|
-
# - libwebpmux2
|
36
|
-
- libfftw3-dev
|
37
|
-
- libglib2.0-dev
|
38
34
|
|
39
35
|
cache:
|
40
36
|
directories:
|
@@ -56,4 +52,4 @@ gemfile:
|
|
56
52
|
|
57
53
|
before_install:
|
58
54
|
- uname -a
|
59
|
-
- bash install-vips.sh
|
55
|
+
- bash install-vips.sh
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.13
|
data/lib/vips/image.rb
CHANGED
@@ -14,8 +14,8 @@ module Vips
|
|
14
14
|
|
15
15
|
attach_function :vips_image_copy_memory, [:pointer], :pointer
|
16
16
|
|
17
|
-
attach_function :vips_filename_get_filename, [:string], :
|
18
|
-
attach_function :vips_filename_get_options, [:string], :
|
17
|
+
attach_function :vips_filename_get_filename, [:string], :pointer
|
18
|
+
attach_function :vips_filename_get_options, [:string], :pointer
|
19
19
|
|
20
20
|
attach_function :vips_foreign_find_load, [:string], :string
|
21
21
|
attach_function :vips_foreign_find_save, [:string], :string
|
@@ -52,6 +52,12 @@ module Vips
|
|
52
52
|
|
53
53
|
attach_function :nickname_find, :vips_nickname_find, [:GType], :string
|
54
54
|
|
55
|
+
# turn a raw pointer that must be freed into a self-freeing Ruby string
|
56
|
+
def self.p2str(pointer)
|
57
|
+
pointer = FFI::AutoPointer.new(pointer, GLib::G_FREE)
|
58
|
+
pointer.read_string
|
59
|
+
end
|
60
|
+
|
55
61
|
public
|
56
62
|
|
57
63
|
# This class represents a libvips image. See the {Vips} module documentation
|
@@ -250,8 +256,8 @@ module Vips
|
|
250
256
|
# pass this
|
251
257
|
raise Vips::Error, "filename is nil" if name == nil
|
252
258
|
|
253
|
-
filename = Vips::vips_filename_get_filename name
|
254
|
-
option_string = Vips::vips_filename_get_options name
|
259
|
+
filename = Vips::p2str(Vips::vips_filename_get_filename name)
|
260
|
+
option_string = Vips::p2str(Vips::vips_filename_get_options name)
|
255
261
|
loader = Vips::vips_foreign_find_load filename
|
256
262
|
raise Vips::Error if loader == nil
|
257
263
|
|
@@ -412,15 +418,15 @@ module Vips
|
|
412
418
|
#
|
413
419
|
# @param name [String] filename to write to
|
414
420
|
def write_to_file name, opts = {}
|
415
|
-
filename = Vips::vips_filename_get_filename name
|
416
|
-
option_string = Vips::vips_filename_get_options name
|
421
|
+
filename = Vips::p2str(Vips::vips_filename_get_filename name)
|
422
|
+
option_string = Vips::p2str(Vips::vips_filename_get_options name)
|
417
423
|
saver = Vips::vips_foreign_find_save filename
|
418
424
|
if saver == nil
|
419
425
|
raise Vips::Error, "No known saver for '#{filename}'."
|
420
426
|
end
|
421
427
|
|
422
428
|
Vips::Operation.call saver, [self, filename], opts, option_string
|
423
|
-
|
429
|
+
|
424
430
|
write_gc
|
425
431
|
end
|
426
432
|
|
@@ -450,8 +456,10 @@ module Vips
|
|
450
456
|
# @macro vips.saveopts
|
451
457
|
# @return [String] the image saved in the specified format
|
452
458
|
def write_to_buffer format_string, opts = {}
|
453
|
-
filename =
|
454
|
-
|
459
|
+
filename =
|
460
|
+
Vips::p2str(Vips::vips_filename_get_filename format_string)
|
461
|
+
option_string =
|
462
|
+
Vips::p2str(Vips::vips_filename_get_options format_string)
|
455
463
|
saver = Vips::vips_foreign_find_save_buffer filename
|
456
464
|
if saver == nil
|
457
465
|
raise Vips::Error, "No known saver for '#{filename}'."
|
data/lib/vips/operation.rb
CHANGED
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.0.
|
4
|
+
version: 2.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Cupitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
195
|
rubyforge_project:
|
196
|
-
rubygems_version: 2.
|
196
|
+
rubygems_version: 2.7.6
|
197
197
|
signing_key:
|
198
198
|
specification_version: 4
|
199
199
|
summary: Ruby extension for the vips image processing library.
|