vips 8.7.0.1 → 8.8.0.1

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +25 -22
  3. data/CHANGELOG.md +266 -0
  4. data/example/annotate.rb +2 -2
  5. data/example/daltonize8.rb +14 -14
  6. data/example/example2.rb +6 -6
  7. data/example/example3.rb +5 -5
  8. data/example/example4.rb +4 -4
  9. data/example/example5.rb +2 -2
  10. data/example/inheritance_with_refcount.rb +207 -207
  11. data/example/thumb.rb +10 -10
  12. data/example/trim8.rb +2 -2
  13. data/example/watermark.rb +14 -35
  14. data/example/wobble.rb +24 -24
  15. data/lib/vips.rb +335 -306
  16. data/lib/vips/access.rb +9 -9
  17. data/lib/vips/align.rb +7 -7
  18. data/lib/vips/angle.rb +8 -8
  19. data/lib/vips/angle45.rb +12 -12
  20. data/lib/vips/bandformat.rb +16 -16
  21. data/lib/vips/blend_mode.rb +34 -0
  22. data/lib/vips/coding.rb +11 -11
  23. data/lib/vips/compass_direction.rb +13 -13
  24. data/lib/vips/direction.rb +7 -7
  25. data/lib/vips/extend.rb +13 -13
  26. data/lib/vips/gobject.rb +94 -94
  27. data/lib/vips/gvalue.rb +232 -232
  28. data/lib/vips/image.rb +1329 -1327
  29. data/lib/vips/interesting.rb +10 -10
  30. data/lib/vips/interpolate.rb +51 -51
  31. data/lib/vips/interpretation.rb +25 -25
  32. data/lib/vips/kernel.rb +18 -18
  33. data/lib/vips/methods.rb +2226 -2139
  34. data/lib/vips/object.rb +208 -208
  35. data/lib/vips/operation.rb +323 -321
  36. data/lib/vips/operationboolean.rb +10 -10
  37. data/lib/vips/operationcomplex.rb +8 -8
  38. data/lib/vips/operationcomplex2.rb +6 -6
  39. data/lib/vips/operationcomplexget.rb +7 -7
  40. data/lib/vips/operationmath.rb +14 -14
  41. data/lib/vips/operationmath2.rb +6 -6
  42. data/lib/vips/operationrelational.rb +11 -11
  43. data/lib/vips/operationround.rb +7 -7
  44. data/lib/vips/size.rb +9 -9
  45. data/lib/vips/version.rb +1 -1
  46. data/vips.gemspec +1 -1
  47. metadata +9 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd2ec41ed5b06c05e49ec92b3fc15ac9b6ee3fbc20afd75bb8dd1e7f48381057
4
- data.tar.gz: d5db22c259c0f15b4758caaffbee45a6a6174e3cab7d771a0fc22c26aef5381b
3
+ metadata.gz: 2428785130e6b8a069f4837cd5d6b41f1cc0850d3447a2a649f21697a18ba121
4
+ data.tar.gz: 67af1fe1fa96d5e6224623a8f79381ade7ea3cdf98bf891f1571ea48bd2bcc61
5
5
  SHA512:
6
- metadata.gz: 3464e0ee5c75721f1cbcc839c7c3d1552b63dcfba7db3247d43330bb79517733313f8cb4a342b0f15d4c1f6bda5843b5438197e561ee5e003cc4ec6b85978f6f
7
- data.tar.gz: e2950d808d20ed7c3aded66e3a7f0551ece8b477b20770a187883b5226cd935b45baa5b012e29964a00055925601d2e5f443fcf3ea3ac5521be5a9b627811717
6
+ metadata.gz: c8f0e4b15623f612f3dcd1ec2da162b361f32c2950d6a0b5eeeba7a7355f837012875546c6dfbeda624e1345d05155ee53c5134862cc072dd248589e05a51529
7
+ data.tar.gz: 7773f7f21ff700fdb6a36e32bac47c8007b1f15f2ab9315192cb2f564239f21d11d1df2b6d9f9ca0bf69692f9a9b89a334ced5a72d4c476ce58c2f10232eada8
data/.travis.yml CHANGED
@@ -1,51 +1,54 @@
1
- os:
2
- - linux
3
- # - osx
4
-
5
- sudo: false
1
+ language: ruby
2
+ dist: xenial
3
+ cache: bundler
6
4
 
7
5
  addons:
8
6
  apt:
9
7
  packages:
10
8
  - libexpat1-dev
11
9
  - gettext
10
+ - libglib2.0-dev
11
+ - liborc-0.4-dev
12
+ - libfftw3-dev
12
13
  - liblcms2-dev
13
14
  - libmagickwand-dev
14
15
  - libopenexr-dev
15
16
  - libcfitsio3-dev
16
17
  - libgif-dev
17
- - libgs-dev
18
18
  - libgsf-1-dev
19
19
  - libmatio-dev
20
20
  - libopenslide-dev
21
- - liborc-0.4-dev
22
21
  - libpango1.0-dev
23
22
  - libpoppler-glib-dev
24
23
  - librsvg2-dev
25
24
  - libwebp-dev
26
- # missing on trusty, unfortunately
27
- # - libwebpmux2
28
- - libfftw3-dev
29
- - libglib2.0-dev
25
+ homebrew:
26
+ packages:
27
+ # A simple way to install all dependencies.
28
+ - vips
29
+ - glib
30
30
 
31
31
  cache:
32
32
  bundler: true
33
33
  directories: $HOME/vips/ext
34
34
 
35
- language: ruby
36
- rvm:
37
- - 2.3
38
- - 2.4
39
- - 2.5
40
- - 2.6
35
+ matrix:
36
+ include:
37
+ - rvm: 2.4
38
+ - rvm: 2.5
39
+ - rvm: 2.6
40
+ - rvm: 2.6
41
+ os: osx
42
+ - rvm: truffleruby
43
+ - rvm: jruby-head
44
+ - rvm: ruby-head
45
+ allow_failures:
46
+ - rvm: truffleruby
47
+ - rvm: ruby-head
48
+ - rvm: jruby-head
41
49
 
42
50
  before_script:
43
- - gem update --system
44
- - gem install bundler
45
51
  - bundle exec rake ext
46
52
 
47
53
  script:
48
54
  - bundle exec rake
49
-
50
- gemfile:
51
- - Gemfile
data/CHANGELOG.md ADDED
@@ -0,0 +1,266 @@
1
+ # Changelog
2
+
3
+ ## master
4
+
5
+ ## Version 2.0.14 (2018-10-3)
6
+
7
+ * update links for new home [jcupitt]
8
+ * various doc fixes [janko-m]
9
+ * update docs for 8.7 [jcupitt]
10
+ * add `Vips::get_suffixes` [jcupitt]
11
+
12
+ ## Version 2.0.13 (2018-8-6)
13
+
14
+ * allow optional args to have `nil` as a value [janko-m]
15
+ * fix five small memleaks [kleisauke]
16
+
17
+ ## Version 2.0.12 (2018-4-25)
18
+
19
+ * fix `Vips::Image#has_alpha?` with older libvips [larskanis]
20
+
21
+ ## Version 2.0.11 (2018-4-23)
22
+
23
+ * fix init with older glib [lsat12357]
24
+ * add `Vips::Image#has_alpha?` and `#add_alpha` [aried3r]
25
+
26
+ ## Version 2.0.10 (2017-12-21)
27
+
28
+ * add support for uint64 parameters
29
+ * add `draw_point` convenience method
30
+ * add docs for `CompassDirection` [janko-m]
31
+ * add `MAX_COORD` constant
32
+ * doc fixes [janko-m]
33
+ * remove duplicate function attach [janko-m]
34
+ * fix a crash with `new_from_buffer` with a UTF-8 string [janko-m]
35
+
36
+ ## Version 2.0.9 (2017-12-21)
37
+
38
+ * update docs for libvips 8.6
39
+
40
+ ## Version 2.0.8 (2017-09-14)
41
+
42
+ * add `thumb.rb` example, and verify we run stably and in constant memory
43
+ * cleanups and polish [Nakilon]
44
+ * add `composite` convenience method
45
+ * add `Vips::concurrency_set` and `Vips::vector_set`
46
+
47
+ ## Version 2.0.7 (2017-09-08)
48
+
49
+ * disable the logging for now, it could deadlock
50
+
51
+ ## Version 2.0.6 (2017-09-02)
52
+
53
+ * improve get() behaviour on error with older libvipses
54
+
55
+ ## Version 2.0.5 (2017-09-02)
56
+
57
+ * fix get() with older libvipses
58
+
59
+ ## Version 2.0.4 (2017-09-02)
60
+
61
+ * add a test for `get_fields`, since it appeared in libvips 8.5 (thanks zverok)
62
+
63
+ ## Version 2.0.3 (2017-09-02)
64
+
65
+ * add `get_fields`
66
+
67
+ ## Version 2.0.2 (2017-08-26)
68
+
69
+ * switch to `logger` for all logging output
70
+ * add libvips cache control functions `Vips::cache_set_max()` etc.
71
+ * fix a ref leak
72
+
73
+ ## Version 2.0.1 (2017-08-23)
74
+
75
+ * add support for `VipsRefStr` in gvalue, thanks tomasc
76
+
77
+ ## Version 2.0.0 (2017-08-22)
78
+
79
+ * rewrite on top of 'ffi' [John Cupitt, Kleis Auke Wolthuizen]
80
+
81
+ ## Version 1.0.6 (2017-07-17)
82
+
83
+ * remove lazy load, fixing a race with multi-threading [felixbuenemann]
84
+ * make `Image#to_a` much faster [John Cupitt]
85
+ * remove the `at_exit` handler [John Cupitt]
86
+
87
+ ## Version 1.0.5 (2017-04-29)
88
+
89
+ * fix `_const` for libvips 8.5 [John Cupitt]
90
+ * add `scaleimage`, the scale operation renamed to avoid a clash with the
91
+ `scale` property [John Cupitt]
92
+ * add `.new_from_image`: make a new image from a constant [John Cupitt]
93
+ * `bandjoin` will use `bandjoin_const`, if it can [John Cupitt]
94
+ * update generated docs for libvips 8.5 [John Cupitt]
95
+ * added docs for new libvips 8.5 enums [John Cupitt]
96
+
97
+ ## Version 1.0.4 (2017-02-07)
98
+
99
+ * remove stray comma from some docs lines [John Cupitt]
100
+ * update generated docs for libvips 8.5 [John Cupitt]
101
+ * small doc improvements [John Cupitt]
102
+ * update for gobject-introspection 3.1 [John Cupitt]
103
+ * support ruby 2.4 [John Cupitt]
104
+
105
+ ## Version 1.0.3 (2016-08-18)
106
+
107
+ * doc improvements [John Cupitt]
108
+ * add `Image#size` to get `[width, height]` [John Cupitt]
109
+ * only ask for ruby 2.0 to help OS X [John Cupitt]
110
+ * break up `Image.call` to make it easier to understand [John Cupitt]
111
+ * detect operation build fail correctly [John Cupitt]
112
+ * lock gobject-introspection at 3.0.8 to avoid breakage [John Cupitt]
113
+
114
+ ## Version 1.0.2 (2016-07-07)
115
+
116
+ * add `.yardopts` to fix ruby-gems docs [John Cupitt]
117
+
118
+ ## Version 1.0.1 (2016-07-07)
119
+
120
+ * simplify gemspec [sandstrom]
121
+ * remove jeweler dependency [John Cupitt]
122
+ * add `.to_a` to Image [John Cupitt]
123
+
124
+ ## Version 1.0.0 (2016-06-07)
125
+
126
+ * complete rewrite, API break [John Cupitt]
127
+
128
+ ## Version 0.3.14 (2016-01-25)
129
+
130
+ * more GC tuning [felixbuenemann]
131
+ * add `write.rb` example program [felixbuenemann]
132
+
133
+ ## Version 0.3.13 (2016-01-18)
134
+
135
+ * don't use generational GC options on old Rubys [John Cupitt]
136
+
137
+ ## Version 0.3.12 (2016-01-17)
138
+
139
+ * incremental GC every 10 writes [felixbuenemann]
140
+ * updated bundle [John Cupitt]
141
+
142
+ ## Version 0.3.11 (2015-10-15)
143
+
144
+ * added magick load from buffer [John Cupitt]
145
+
146
+ ## Version 0.3.10 (2015-06-24)
147
+
148
+ * added webp write [John Cupitt]
149
+
150
+ ## Version 0.3.9 (2014-07-17)
151
+
152
+ * removed a stray file from gemspec [Alessandro Tagliapietra]
153
+ * updated bundle [John Cupitt]
154
+ * revised spec tests [John Cupitt]
155
+ * fix a segv in im.label_regions [John Cupitt]
156
+ * add a Valgrind suppressions file [John Cupitt]
157
+ * fix .monotonic? [John Cupitt]
158
+ * fix .data on coded images [John Cupitt]
159
+ * add .size, see issue #58 [John Cupitt]
160
+ * add rdoc-data dep, maybe it will help ruby-gems docs [John Cupitt]
161
+
162
+ ## Version 0.3.8 (2014-05-11)
163
+
164
+ * add VIPS::thread_shutdown(), must be called on foreign thread exit [John Cupitt]
165
+
166
+ ## Version 0.3.7 (2014-02-04)
167
+
168
+ * update build dependencies [John Cupitt]
169
+ * README updated [John Cupitt]
170
+
171
+ ## Version 0.3.6 (2013-06-25)
172
+
173
+ * add png and jpg load from memory buffer [John Cupitt]
174
+ * README updated to include buffer read/write example [John Cupitt]
175
+ * better vips version testing [John Cupitt]
176
+ * spec tests for new buffer read/write code [John Cupitt]
177
+ * fix rdoc build to include C sources [John Cupitt]
178
+ * better compat with older libvips [John Cupitt]
179
+
180
+ ## Version 0.3.5 (2013-01-15)
181
+
182
+ * rb_raise() in mask.c no longer passes a string pointer as the fmt arg, stopping gcc bailing out on some platforms [John Cupitt]
183
+ * Image.magick() now calls im_magick2vips() directly rather than relying on libvips file type sniffing [John Cupitt]
184
+
185
+ ## Version 0.3.4 (2012-09-11)
186
+
187
+ * Update specs for lcms changes, thanks Stanislaw [John Cupitt]
188
+ * VIPS::Reader supports .exif() / .exif?() methods for better back compat, thanks Jeremy [John Cupitt]
189
+ * VIPS::Reader fallbacks load the image if its not been loaded [John Cupitt]
190
+ * VIPS::Reader no longer allows VIPS::Header methods [John Cupitt]
191
+
192
+ ## Version 0.3.3 (2012-08-31)
193
+
194
+ * Typo in workaround in 0.3.2 [John Cupitt]
195
+
196
+ ## Version 0.3.2 (2012-08-31)
197
+
198
+ ### Fixed
199
+
200
+ * Workaround helps ruby-vips compile (and run) against 7.26.3 [John Cupitt and
201
+ James Harrison]
202
+
203
+ ## Version 0.3.1 (2012-08-30)
204
+
205
+ ### Fixed
206
+
207
+ * PNG writer no longer changes the filename argument [John Cupitt]
208
+ * Workaround helps ruby-vips compile against 7.26.3 [John Cupitt]
209
+ * Image read now runs GC and retries on fail [John Cupitt]
210
+ * Image write GCs every 100 images [John Cupitt]
211
+
212
+ ## Version 0.3.0 (2012-07-20)
213
+
214
+ ### Added
215
+
216
+ * More rspec tests [John Cupitt]
217
+ * Updated to libvips-7.30 [John Cupitt]
218
+
219
+ ### Changed
220
+
221
+ * Reworked Reader class offers better performance and compatibility [John
222
+ Cupitt]
223
+ * Don't use :sequential option for older libvipses [John Cupitt]
224
+ * Rename "tone_analyze" as "tone_analyse" for consistency with the rest of
225
+ vips [John CUpitt]
226
+
227
+ ### Fixed
228
+
229
+ * Now passes rspec test suite cleanly in valgrind [John Cupitt]
230
+ * Fixed check of sequential mode support [Stanislaw Pankevich]
231
+
232
+ ## Version 0.2.0 (2012-06-29)
233
+
234
+ ### Added
235
+
236
+ * Add tile_cache [John Cupitt]
237
+ * Add :sequential option to tiff, jpeg and png readers [John Cupitt]
238
+ * Add raise if suitable pkg_config for libvips is not found, thanks to Pierre
239
+ Chapuis [Stanislaw Pankevich]
240
+ * Add backward compatibility of 0.1.x ruby-vips with libvips versions less than 7.28 [John Cupitt]
241
+ * Add Travis. ruby-vips now is being tested on travis-ci.org. [Stanislaw Pankevich]
242
+
243
+ ### Changed
244
+
245
+ * Disable the vips8 operation cache to save some memory [John Cupitt]
246
+ * Update example shrinker [John Cupitt]
247
+
248
+ ### Fixed
249
+
250
+ * #8: Memory allocation-free issues [Grigoriy Chudnov]
251
+
252
+ ## Version 0.1.1 (2012-06-22)
253
+
254
+ ### Changed
255
+
256
+ * Upgrade spec/* code to latest RSpec [Stanislaw Pankevich]
257
+
258
+ ### Added
259
+
260
+ * Added CHANGELOG.md file (thanks to jnicklas/capybara - using the layout of their History.txt) [Stanislaw Pankevich]
261
+ * Added Gemfile with the only 'rspec' dependency. [Stanislaw Pankevich]
262
+ * Added Jeweler Rakefile contents to release ruby-vips as a gem. [Stanislaw Pankevich]
263
+
264
+ ## Before (initial unreleased version 0.1.0)
265
+
266
+ Long-long history here undocumented...
data/example/annotate.rb CHANGED
@@ -5,13 +5,13 @@ require 'vips'
5
5
  im = Vips::Image.new_from_file ARGV[0], :access => :sequential
6
6
 
7
7
  left_text = Vips::Image.text "left corner", :dpi => 300
8
- left = left_text.embed 50, 50, im.width, 150
8
+ left = left_text.embed 50, 50, im.width, 150
9
9
 
10
10
  right_text = Vips::Image.text "right corner", :dpi => 300
11
11
  right = right_text.embed im.width - right_text.width - 50, 50, im.width, 150
12
12
 
13
13
  footer = (left | right).ifthenelse(0, [255, 0, 0], :blend => true)
14
14
 
15
- im = im.insert footer, 0, im.height, :expand => true
15
+ im = im.insert footer, 0, im.height, :expand => true
16
16
 
17
17
  im.write_to_file ARGV[1]
@@ -28,20 +28,20 @@ im = Vips::Image.new_from_file ARGV[0]
28
28
  # remove any alpha channel before processing
29
29
  alpha = nil
30
30
  if im.bands == 4
31
- alpha = im[3]
32
- im = im.extract_band 0, :n => 3
31
+ alpha = im[3]
32
+ im = im.extract_band 0, :n => 3
33
33
  end
34
34
 
35
35
  begin
36
- # import to XYZ with lcms
37
- # if there's no profile there, we'll fall back to the thing below
38
- xyz = im.icc_import :embedded => true, :pcs => :xyz
36
+ # import to XYZ with lcms
37
+ # if there's no profile there, we'll fall back to the thing below
38
+ xyz = im.icc_import :embedded => true, :pcs => :xyz
39
39
  rescue Vips::Error
40
- # nope .. use the built-in converter instead
41
- xyz = im.colourspace :xyz
40
+ # nope .. use the built-in converter instead
41
+ xyz = im.colourspace :xyz
42
42
  end
43
43
 
44
- brad = xyz.recomb xyz_to_brad
44
+ brad = xyz.recomb xyz_to_brad
45
45
 
46
46
  # through the Deuteranope matrix
47
47
  # we need rows to sum to 1 in Bradford space --- the matrix in the original
@@ -52,24 +52,24 @@ deut = brad.recomb [
52
52
  [0, 0, 1]
53
53
  ]
54
54
 
55
- xyz = deut.recomb brad_to_xyz
55
+ xyz = deut.recomb brad_to_xyz
56
56
 
57
- # .. and back to sRGB
57
+ # .. and back to sRGB
58
58
  rgb = xyz.colourspace :srgb
59
59
 
60
- # so this is the colour error
60
+ # so this is the colour error
61
61
  err = im - rgb
62
62
 
63
63
  # add the error back to other channels to make a compensated image
64
64
  im = im + err.recomb([
65
- [0, 0, 0],
65
+ [0, 0, 0],
66
66
  [0.7, 1, 0],
67
67
  [0.7, 0, 1]
68
68
  ])
69
69
 
70
70
  # reattach any alpha we saved above
71
71
  if alpha
72
- im = im.bandjoin(alpha)
72
+ im = im.bandjoin(alpha)
73
73
  end
74
74
 
75
- im.write_to_file ARGV[1]
75
+ im.write_to_file ARGV[1]
data/example/example2.rb CHANGED
@@ -17,12 +17,12 @@ Vips::cache_set_max 0
17
17
  n = 10000
18
18
 
19
19
  n.times do |i|
20
- puts ""
21
- puts "call #{i} ..."
22
- out = Vips::Operation.call "black", [200, 300]
23
- if out.width != 200 or out.height != 300
24
- puts "bad image result from black"
25
- end
20
+ puts ""
21
+ puts "call #{i} ..."
22
+ out = Vips::Operation.call "black", [200, 300]
23
+ if out.width != 200 or out.height != 300
24
+ puts "bad image result from black"
25
+ end
26
26
  end
27
27
 
28
28
  puts ""