ruby-vips8 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +1 -0
  3. data/.yardopts +10 -0
  4. data/CHANGELOG.md +5 -0
  5. data/Gemfile +15 -0
  6. data/Gemfile.lock +84 -0
  7. data/LICENSE.txt +20 -0
  8. data/README.md +170 -0
  9. data/Rakefile +45 -0
  10. data/TODO +11 -0
  11. data/VERSION +1 -0
  12. data/example/annotate.rb +17 -0
  13. data/example/daltonize8.rb +75 -0
  14. data/example/example1.rb +84 -0
  15. data/example/example2.rb +31 -0
  16. data/example/example3.rb +19 -0
  17. data/example/example4.rb +18 -0
  18. data/example/example5.rb +31 -0
  19. data/example/trim8.rb +41 -0
  20. data/example/watermark.rb +44 -0
  21. data/example/wobble.rb +36 -0
  22. data/lib/vips8.rb +153 -0
  23. data/lib/vips8/access.rb +14 -0
  24. data/lib/vips8/align.rb +11 -0
  25. data/lib/vips8/angle.rb +12 -0
  26. data/lib/vips8/angle45.rb +16 -0
  27. data/lib/vips8/argument.rb +163 -0
  28. data/lib/vips8/bandformat.rb +20 -0
  29. data/lib/vips8/call.rb +302 -0
  30. data/lib/vips8/coding.rb +14 -0
  31. data/lib/vips8/demandstyle.rb +35 -0
  32. data/lib/vips8/direction.rb +11 -0
  33. data/lib/vips8/error.rb +30 -0
  34. data/lib/vips8/extend.rb +22 -0
  35. data/lib/vips8/foreignflags.rb +20 -0
  36. data/lib/vips8/image.rb +1383 -0
  37. data/lib/vips8/interpolate.rb +37 -0
  38. data/lib/vips8/interpretation.rb +28 -0
  39. data/lib/vips8/methods.rb +1807 -0
  40. data/lib/vips8/operation.rb +19 -0
  41. data/ruby-vips8.gemspec +112 -0
  42. data/spec/image_spec.rb +515 -0
  43. data/spec/samples/balloon.v +0 -0
  44. data/spec/samples/ghost.ppm +405 -0
  45. data/spec/samples/huge.jpg +0 -0
  46. data/spec/samples/icc.jpg +0 -0
  47. data/spec/samples/lcd.icc +0 -0
  48. data/spec/samples/lion.svg +154 -0
  49. data/spec/samples/sample.csv +7 -0
  50. data/spec/samples/sample.exr +0 -0
  51. data/spec/samples/wagon.jpg +0 -0
  52. data/spec/samples/wagon.v +0 -0
  53. data/spec/spec_helper.rb +49 -0
  54. data/spec/vips_spec.rb +74 -0
  55. metadata +198 -0
@@ -0,0 +1,37 @@
1
+ module Vips
2
+
3
+ # An interpolator. One of these can be given to operations like
4
+ # {Vips::affine} or {Vips::mapim} to select the type of pixel interpolation
5
+ # to use.
6
+ #
7
+ # To see all interpolators supported by your
8
+ # libvips, try
9
+ #
10
+ # ```
11
+ # $ vips -l interpolate
12
+ # ```
13
+ #
14
+ # But at least these should be available:
15
+ #
16
+ # * `:nearest` Nearest-neighbour interpolation.
17
+ # * `:bilinear` Bilinear interpolation.
18
+ # * `:bicubic` Bicubic interpolation.
19
+ # * `:lbb` Reduced halo bicubic interpolation.
20
+ # * `:nohalo` Edge sharpening resampler with halo reduction.
21
+ # * `:vsqbs` B-Splines with antialiasing smoothing.
22
+ #
23
+ # For example:
24
+ #
25
+ # ```ruby
26
+ # im = im.affine :interpolate => Vips::Interpolate.new :bicubic
27
+ # ```
28
+
29
+ class Interpolate
30
+
31
+ # @!method self.new(name, opts = {})
32
+ # @param name [Symbol] interpolator to create
33
+ # @param [Hash] opts Set of options
34
+ # @return [Interpolate] constructed interpolator
35
+
36
+ end
37
+ end
@@ -0,0 +1,28 @@
1
+ module Vips
2
+
3
+ # How the values in an image should be interpreted. For example, a
4
+ # three-band float image of type :lab should have its
5
+ # pixels interpreted as coordinates in CIE Lab space.
6
+ #
7
+ # * `:multiband` generic many-band image
8
+ # * `:b_w` some kind of single-band image
9
+ # * `:histogram` a 1D image, eg. histogram or lookup table
10
+ # * `:fourier` image is in fourier space
11
+ # * `:xyz` the first three bands are CIE XYZ
12
+ # * `:lab` pixels are in CIE Lab space
13
+ # * `:cmyk` the first four bands are in CMYK space
14
+ # * `:labq` implies #VIPS_CODING_LABQ
15
+ # * `:rgb` generic RGB space
16
+ # * `:cmc` a uniform colourspace based on CMC(1:1)
17
+ # * `:lch` pixels are in CIE LCh space
18
+ # * `:labs` CIE LAB coded as three signed 16-bit values
19
+ # * `:srgb` pixels are sRGB
20
+ # * `:hsv` pixels are HSV
21
+ # * `:scrgb` pixels are scRGB
22
+ # * `:yxy` pixels are CIE Yxy
23
+ # * `:rgb16` generic 16-bit RGB
24
+ # * `:grey16` generic 16-bit mono
25
+ # * `:matrix` a matrix
26
+ class Interpretation
27
+ end
28
+ end
@@ -0,0 +1,1807 @@
1
+ module Vips
2
+ class Image
3
+
4
+ # @!method self.system(cmd_format, opts = {})
5
+ # Run an external command.
6
+ # @param cmd_format [String] Command to run
7
+ # @param [Hash] opts Set of options
8
+ # @option opts [Array<Image>] :in Array of input images
9
+ # @option opts [String] :in_format Format for input filename
10
+ # @option opts [String] :out_format Format for output filename
11
+ # @option opts [Vips::Image] :out Output -- Output image
12
+ # @option opts [String] :log Output -- Command log
13
+ # @return [nil, Hash<Symbol => Object>] Hash of optional output items
14
+
15
+ # @!method add(right, opts = {})
16
+ # Add two images.
17
+ # @param right [Vips::Image] Right-hand image argument
18
+ # @param [Hash] opts Set of options
19
+ # @return [Vips::Image] Output image
20
+
21
+ # @!method subtract(right, opts = {})
22
+ # Subtract two images.
23
+ # @param right [Vips::Image] Right-hand image argument
24
+ # @param [Hash] opts Set of options
25
+ # @return [Vips::Image] Output image
26
+
27
+ # @!method multiply(right, opts = {})
28
+ # Multiply two images.
29
+ # @param right [Vips::Image] Right-hand image argument
30
+ # @param [Hash] opts Set of options
31
+ # @return [Vips::Image] Output image
32
+
33
+ # @!method divide(right, opts = {})
34
+ # Divide two images.
35
+ # @param right [Vips::Image] Right-hand image argument
36
+ # @param [Hash] opts Set of options
37
+ # @return [Vips::Image] Output image
38
+
39
+ # @!method relational(right, relational, opts = {})
40
+ # Relational operation on two images.
41
+ # @param right [Vips::Image] Right-hand image argument
42
+ # @param relational [Vips::OperationRelational] relational to perform
43
+ # @param [Hash] opts Set of options
44
+ # @return [Vips::Image] Output image
45
+
46
+ # @!method remainder(right, opts = {})
47
+ # Remainder after integer division of two images.
48
+ # @param right [Vips::Image] Right-hand image argument
49
+ # @param [Hash] opts Set of options
50
+ # @return [Vips::Image] Output image
51
+
52
+ # @!method boolean(right, boolean, opts = {})
53
+ # Boolean operation on two images.
54
+ # @param right [Vips::Image] Right-hand image argument
55
+ # @param boolean [Vips::OperationBoolean] boolean to perform
56
+ # @param [Hash] opts Set of options
57
+ # @return [Vips::Image] Output image
58
+
59
+ # @!method math2(right, math2, opts = {})
60
+ # Binary math operations.
61
+ # @param right [Vips::Image] Right-hand image argument
62
+ # @param math2 [Vips::OperationMath2] math to perform
63
+ # @param [Hash] opts Set of options
64
+ # @return [Vips::Image] Output image
65
+
66
+ # @!method complex2(right, cmplx, opts = {})
67
+ # Complex binary operations on two images.
68
+ # @param right [Vips::Image] Right-hand image argument
69
+ # @param cmplx [Vips::OperationComplex2] binary complex operation to perform
70
+ # @param [Hash] opts Set of options
71
+ # @return [Vips::Image] Output image
72
+
73
+ # @!method complexform(right, opts = {})
74
+ # Form a complex image from two real images.
75
+ # @param right [Vips::Image] Right-hand image argument
76
+ # @param [Hash] opts Set of options
77
+ # @return [Vips::Image] Output image
78
+
79
+ # @!method self.sum(in, opts = {})
80
+ # Sum an array of images.
81
+ # @param in [Array<Image>] Array of input images
82
+ # @param [Hash] opts Set of options
83
+ # @return [Vips::Image] Output image
84
+
85
+ # @!method invert(, opts = {})
86
+ # Invert an image.
87
+ # @param [Hash] opts Set of options
88
+ # @return [Vips::Image] Output image
89
+
90
+ # @!method linear(a, b, opts = {})
91
+ # Calculate (a * in + b).
92
+ # @param a [Array<Double>] Multiply by this
93
+ # @param b [Array<Double>] Add this
94
+ # @param [Hash] opts Set of options
95
+ # @option opts [Boolean] :uchar Output should be uchar
96
+ # @return [Vips::Image] Output image
97
+
98
+ # @!method math(math, opts = {})
99
+ # Apply a math operation to an image.
100
+ # @param math [Vips::OperationMath] math to perform
101
+ # @param [Hash] opts Set of options
102
+ # @return [Vips::Image] Output image
103
+
104
+ # @!method abs(, opts = {})
105
+ # Absolute value of an image.
106
+ # @param [Hash] opts Set of options
107
+ # @return [Vips::Image] Output image
108
+
109
+ # @!method sign(, opts = {})
110
+ # Unit vector of pixel.
111
+ # @param [Hash] opts Set of options
112
+ # @return [Vips::Image] Output image
113
+
114
+ # @!method round(round, opts = {})
115
+ # Perform a round function on an image.
116
+ # @param round [Vips::OperationRound] rounding operation to perform
117
+ # @param [Hash] opts Set of options
118
+ # @return [Vips::Image] Output image
119
+
120
+ # @!method relational_const(c, relational, opts = {})
121
+ # Relational operations against a constant.
122
+ # @param c [Array<Double>] Array of constants
123
+ # @param relational [Vips::OperationRelational] relational to perform
124
+ # @param [Hash] opts Set of options
125
+ # @return [Vips::Image] Output image
126
+
127
+ # @!method remainder_const(c, opts = {})
128
+ # Remainder after integer division of an image and a constant.
129
+ # @param c [Array<Double>] Array of constants
130
+ # @param [Hash] opts Set of options
131
+ # @return [Vips::Image] Output image
132
+
133
+ # @!method boolean_const(c, boolean, opts = {})
134
+ # Boolean operations against a constant.
135
+ # @param c [Array<Double>] Array of constants
136
+ # @param boolean [Vips::OperationBoolean] boolean to perform
137
+ # @param [Hash] opts Set of options
138
+ # @return [Vips::Image] Output image
139
+
140
+ # @!method math2_const(c, math2, opts = {})
141
+ # Pow( @in, @c ).
142
+ # @param c [Array<Double>] Array of constants
143
+ # @param math2 [Vips::OperationMath2] math to perform
144
+ # @param [Hash] opts Set of options
145
+ # @return [Vips::Image] Output image
146
+
147
+ # @!method complex(cmplx, opts = {})
148
+ # Perform a complex operation on an image.
149
+ # @param cmplx [Vips::OperationComplex] complex to perform
150
+ # @param [Hash] opts Set of options
151
+ # @return [Vips::Image] Output image
152
+
153
+ # @!method complexget(get, opts = {})
154
+ # Get a component from a complex image.
155
+ # @param get [Vips::OperationComplexget] complex to perform
156
+ # @param [Hash] opts Set of options
157
+ # @return [Vips::Image] Output image
158
+
159
+ # @!method avg(, opts = {})
160
+ # Find image average.
161
+ # @param [Hash] opts Set of options
162
+ # @return [Float] Output value
163
+
164
+ # @!method min(, opts = {})
165
+ # Find image minimum.
166
+ # @param [Hash] opts Set of options
167
+ # @option opts [Integer] :size Number of minimum values to find
168
+ # @option opts [Integer] :x Output -- Horizontal position of minimum
169
+ # @option opts [Integer] :y Output -- Vertical position of minimum
170
+ # @option opts [Array<Double>] :out_array Output -- Array of output values
171
+ # @option opts [Array<Integer>] :x_array Output -- Array of horizontal positions
172
+ # @option opts [Array<Integer>] :y_array Output -- Array of vertical positions
173
+ # @return [Float, Hash<Symbol => Object>] Output value, Hash of optional output items
174
+
175
+ # @!method max(, opts = {})
176
+ # Find image maximum.
177
+ # @param [Hash] opts Set of options
178
+ # @option opts [Integer] :size Number of maximum values to find
179
+ # @option opts [Integer] :x Output -- Horizontal position of maximum
180
+ # @option opts [Integer] :y Output -- Vertical position of maximum
181
+ # @option opts [Array<Double>] :out_array Output -- Array of output values
182
+ # @option opts [Array<Integer>] :x_array Output -- Array of horizontal positions
183
+ # @option opts [Array<Integer>] :y_array Output -- Array of vertical positions
184
+ # @return [Float, Hash<Symbol => Object>] Output value, Hash of optional output items
185
+
186
+ # @!method deviate(, opts = {})
187
+ # Find image standard deviation.
188
+ # @param [Hash] opts Set of options
189
+ # @return [Float] Output value
190
+
191
+ # @!method stats(, opts = {})
192
+ # Find image average.
193
+ # @param [Hash] opts Set of options
194
+ # @return [Vips::Image] Output array of statistics
195
+
196
+ # @!method hist_find(, opts = {})
197
+ # Find image histogram.
198
+ # @param [Hash] opts Set of options
199
+ # @option opts [Integer] :band Find histogram of band
200
+ # @return [Vips::Image] Output histogram
201
+
202
+ # @!method hist_find_ndim(, opts = {})
203
+ # Find n-dimensional image histogram.
204
+ # @param [Hash] opts Set of options
205
+ # @option opts [Integer] :bins Number of bins in each dimension
206
+ # @return [Vips::Image] Output histogram
207
+
208
+ # @!method hist_find_indexed(index, opts = {})
209
+ # Find indexed image histogram.
210
+ # @param index [Vips::Image] Index image
211
+ # @param [Hash] opts Set of options
212
+ # @return [Vips::Image] Output histogram
213
+
214
+ # @!method hough_line(, opts = {})
215
+ # Find hough line transform.
216
+ # @param [Hash] opts Set of options
217
+ # @option opts [Integer] :width horizontal size of parameter space
218
+ # @option opts [Integer] :height Vertical size of parameter space
219
+ # @return [Vips::Image] Output image
220
+
221
+ # @!method hough_circle(, opts = {})
222
+ # Find hough circle transform.
223
+ # @param [Hash] opts Set of options
224
+ # @option opts [Integer] :scale Scale down dimensions by this factor
225
+ # @option opts [Integer] :min_radius Smallest radius to search for
226
+ # @option opts [Integer] :max_radius Largest radius to search for
227
+ # @return [Vips::Image] Output image
228
+
229
+ # @!method project(, opts = {})
230
+ # Find image projections.
231
+ # @param [Hash] opts Set of options
232
+ # @return [Array<] Sums of columns, Sums of rows
233
+
234
+ # @!method profile(, opts = {})
235
+ # Find image profiles.
236
+ # @param [Hash] opts Set of options
237
+ # @return [Array<] First non-zero pixel in column, First non-zero pixel in row
238
+
239
+ # @!method measure(h, v, opts = {})
240
+ # Measure a set of patches on a colour chart.
241
+ # @param h [Integer] Number of patches across chart
242
+ # @param v [Integer] Number of patches down chart
243
+ # @param [Hash] opts Set of options
244
+ # @option opts [Integer] :left Left edge of extract area
245
+ # @option opts [Integer] :top Top edge of extract area
246
+ # @option opts [Integer] :width Width of extract area
247
+ # @option opts [Integer] :height Height of extract area
248
+ # @return [Vips::Image] Output array of statistics
249
+
250
+ # @!method getpoint(x, y, opts = {})
251
+ # Read a point from an image.
252
+ # @param x [Integer] Point to read
253
+ # @param y [Integer] Point to read
254
+ # @param [Hash] opts Set of options
255
+ # @return [Array<Double>] Array of output values
256
+
257
+ # @!method copy(, opts = {})
258
+ # Copy an image.
259
+ # @param [Hash] opts Set of options
260
+ # @option opts [Integer] :width Image width in pixels
261
+ # @option opts [Integer] :height Image height in pixels
262
+ # @option opts [Integer] :bands Number of bands in image
263
+ # @option opts [Vips::BandFormat] :format Pixel format in image
264
+ # @option opts [Vips::Coding] :coding Pixel coding
265
+ # @option opts [Vips::Interpretation] :interpretation Pixel interpretation
266
+ # @option opts [Float] :xres Horizontal resolution in pixels/mm
267
+ # @option opts [Float] :yres Vertical resolution in pixels/mm
268
+ # @option opts [Integer] :xoffset Horizontal offset of origin
269
+ # @option opts [Integer] :yoffset Vertical offset of origin
270
+ # @return [Vips::Image] Output image
271
+
272
+ # @!method tilecache(, opts = {})
273
+ # Cache an image as a set of tiles.
274
+ # @param [Hash] opts Set of options
275
+ # @option opts [Integer] :tile_width Tile width in pixels
276
+ # @option opts [Integer] :tile_height Tile height in pixels
277
+ # @option opts [Integer] :max_tiles Maximum number of tiles to cache
278
+ # @option opts [Vips::Access] :access Expected access pattern
279
+ # @option opts [Boolean] :threaded Allow threaded access
280
+ # @option opts [Boolean] :persistent Keep cache between evaluations
281
+ # @return [Vips::Image] Output image
282
+
283
+ # @!method linecache(, opts = {})
284
+ # Cache an image as a set of lines.
285
+ # @param [Hash] opts Set of options
286
+ # @option opts [Integer] :tile_height Tile height in pixels
287
+ # @option opts [Vips::Access] :access Expected access pattern
288
+ # @option opts [Boolean] :threaded Allow threaded access
289
+ # @option opts [Boolean] :persistent Keep cache between evaluations
290
+ # @return [Vips::Image] Output image
291
+
292
+ # @!method sequential(, opts = {})
293
+ # Check sequential access.
294
+ # @param [Hash] opts Set of options
295
+ # @option opts [Boolean] :trace trace pixel requests
296
+ # @option opts [Integer] :tile_height Tile height in pixels
297
+ # @option opts [Vips::Access] :access Expected access pattern
298
+ # @return [Vips::Image] Output image
299
+
300
+ # @!method cache(, opts = {})
301
+ # Cache an image.
302
+ # @param [Hash] opts Set of options
303
+ # @option opts [Integer] :tile_width Tile width in pixels
304
+ # @option opts [Integer] :tile_height Tile height in pixels
305
+ # @option opts [Integer] :max_tiles Maximum number of tiles to cache
306
+ # @return [Vips::Image] Output image
307
+
308
+ # @!method embed(x, y, width, height, opts = {})
309
+ # Embed an image in a larger image.
310
+ # @param x [Integer] Left edge of input in output
311
+ # @param y [Integer] Top edge of input in output
312
+ # @param width [Integer] Image width in pixels
313
+ # @param height [Integer] Image height in pixels
314
+ # @param [Hash] opts Set of options
315
+ # @option opts [Vips::Extend] :extend How to generate the extra pixels
316
+ # @option opts [Array<Double>] :background Colour for background pixels
317
+ # @return [Vips::Image] Output image
318
+
319
+ # @!method flip(direction, opts = {})
320
+ # Flip an image.
321
+ # @param direction [Vips::Direction] Direction to flip image
322
+ # @param [Hash] opts Set of options
323
+ # @return [Vips::Image] Output image
324
+
325
+ # @!method insert(sub, x, y, opts = {})
326
+ # Insert image @sub into @main at @x, @y.
327
+ # @param sub [Vips::Image] Sub-image to insert into main image
328
+ # @param x [Integer] Left edge of sub in main
329
+ # @param y [Integer] Top edge of sub in main
330
+ # @param [Hash] opts Set of options
331
+ # @option opts [Boolean] :expand Expand output to hold all of both inputs
332
+ # @option opts [Array<Double>] :background Colour for new pixels
333
+ # @return [Vips::Image] Output image
334
+
335
+ # @!method join(in2, direction, opts = {})
336
+ # Join a pair of images.
337
+ # @param in2 [Vips::Image] Second input image
338
+ # @param direction [Vips::Direction] Join left-right or up-down
339
+ # @param [Hash] opts Set of options
340
+ # @option opts [Vips::Align] :align Align on the low, centre or high coordinate edge
341
+ # @option opts [Boolean] :expand Expand output to hold all of both inputs
342
+ # @option opts [Integer] :shim Pixels between images
343
+ # @option opts [Array<Double>] :background Colour for new pixels
344
+ # @return [Vips::Image] Output image
345
+
346
+ # @!method self.arrayjoin(in, opts = {})
347
+ # Join an array of images.
348
+ # @param in [Array<Image>] Array of input images
349
+ # @param [Hash] opts Set of options
350
+ # @option opts [Integer] :across Number of images across grid
351
+ # @option opts [Integer] :shim Pixels between images
352
+ # @option opts [Array<Double>] :background Colour for new pixels
353
+ # @option opts [Vips::Align] :halign Align on the left, centre or right
354
+ # @option opts [Vips::Align] :valign Align on the top, centre or bottom
355
+ # @option opts [Integer] :hspacing Horizontal spacing between images
356
+ # @option opts [Integer] :vspacing Vertical spacing between images
357
+ # @return [Vips::Image] Output image
358
+
359
+ # @!method extract_area(left, top, width, height, opts = {})
360
+ # Extract an area from an image.
361
+ # @param left [Integer] Left edge of extract area
362
+ # @param top [Integer] Top edge of extract area
363
+ # @param width [Integer] Width of extract area
364
+ # @param height [Integer] Height of extract area
365
+ # @param [Hash] opts Set of options
366
+ # @return [Vips::Image] Output image
367
+
368
+ # @!method extract_area(left, top, width, height, opts = {})
369
+ # Extract an area from an image.
370
+ # @param left [Integer] Left edge of extract area
371
+ # @param top [Integer] Top edge of extract area
372
+ # @param width [Integer] Width of extract area
373
+ # @param height [Integer] Height of extract area
374
+ # @param [Hash] opts Set of options
375
+ # @return [Vips::Image] Output image
376
+
377
+ # @!method extract_band(band, opts = {})
378
+ # Extract band from an image.
379
+ # @param band [Integer] Band to extract
380
+ # @param [Hash] opts Set of options
381
+ # @option opts [Integer] :n Number of bands to extract
382
+ # @return [Vips::Image] Output image
383
+
384
+ # @!method bandjoin_const(c, opts = {})
385
+ # Append a constant band to an image.
386
+ # @param c [Array<Double>] Array of constants to add
387
+ # @param [Hash] opts Set of options
388
+ # @return [Vips::Image] Output image
389
+
390
+ # @!method self.bandrank(in, opts = {})
391
+ # Band-wise rank of a set of images.
392
+ # @param in [Array<Image>] Array of input images
393
+ # @param [Hash] opts Set of options
394
+ # @option opts [Integer] :index Select this band element from sorted list
395
+ # @return [Vips::Image] Output image
396
+
397
+ # @!method bandmean(, opts = {})
398
+ # Band-wise average.
399
+ # @param [Hash] opts Set of options
400
+ # @return [Vips::Image] Output image
401
+
402
+ # @!method bandbool(boolean, opts = {})
403
+ # Boolean operation across image bands.
404
+ # @param boolean [Vips::OperationBoolean] boolean to perform
405
+ # @param [Hash] opts Set of options
406
+ # @return [Vips::Image] Output image
407
+
408
+ # @!method replicate(across, down, opts = {})
409
+ # Replicate an image.
410
+ # @param across [Integer] Repeat this many times horizontally
411
+ # @param down [Integer] Repeat this many times vertically
412
+ # @param [Hash] opts Set of options
413
+ # @return [Vips::Image] Output image
414
+
415
+ # @!method cast(format, opts = {})
416
+ # Cast an image.
417
+ # @param format [Vips::BandFormat] Format to cast to
418
+ # @param [Hash] opts Set of options
419
+ # @option opts [Boolean] :shift Shift integer values up and down
420
+ # @return [Vips::Image] Output image
421
+
422
+ # @!method rot(angle, opts = {})
423
+ # Rotate an image.
424
+ # @param angle [Vips::Angle] Angle to rotate image
425
+ # @param [Hash] opts Set of options
426
+ # @return [Vips::Image] Output image
427
+
428
+ # @!method rot45(, opts = {})
429
+ # Rotate an image.
430
+ # @param [Hash] opts Set of options
431
+ # @option opts [Vips::Angle45] :angle Angle to rotate image
432
+ # @return [Vips::Image] Output image
433
+
434
+ # @!method autorot(, opts = {})
435
+ # Autorotate image by exif tag.
436
+ # @param [Hash] opts Set of options
437
+ # @option opts [Vips::Angle] :angle Output -- Angle image was rotated by
438
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
439
+
440
+ # @!method recomb(m, opts = {})
441
+ # Linear recombination with matrix.
442
+ # @param m [Vips::Image] matrix of coefficients
443
+ # @param [Hash] opts Set of options
444
+ # @return [Vips::Image] Output image
445
+
446
+ # @!method bandfold(, opts = {})
447
+ # Fold up x axis into bands.
448
+ # @param [Hash] opts Set of options
449
+ # @option opts [Integer] :factor Fold by this factor
450
+ # @return [Vips::Image] Output image
451
+
452
+ # @!method bandunfold(, opts = {})
453
+ # Unfold image bands into x axis.
454
+ # @param [Hash] opts Set of options
455
+ # @option opts [Integer] :factor Unfold by this factor
456
+ # @return [Vips::Image] Output image
457
+
458
+ # @!method flatten(, opts = {})
459
+ # Flatten alpha out of an image.
460
+ # @param [Hash] opts Set of options
461
+ # @option opts [Array<Double>] :background Background value
462
+ # @option opts [Float] :max_alpha Maximum value of alpha channel
463
+ # @return [Vips::Image] Output image
464
+
465
+ # @!method premultiply(, opts = {})
466
+ # Premultiply image alpha.
467
+ # @param [Hash] opts Set of options
468
+ # @option opts [Float] :max_alpha Maximum value of alpha channel
469
+ # @return [Vips::Image] Output image
470
+
471
+ # @!method unpremultiply(, opts = {})
472
+ # Unpremultiply image alpha.
473
+ # @param [Hash] opts Set of options
474
+ # @option opts [Float] :max_alpha Maximum value of alpha channel
475
+ # @return [Vips::Image] Output image
476
+
477
+ # @!method grid(tile_height, across, down, opts = {})
478
+ # Grid an image.
479
+ # @param tile_height [Integer] chop into tiles this high
480
+ # @param across [Integer] number of tiles across
481
+ # @param down [Integer] number of tiles down
482
+ # @param [Hash] opts Set of options
483
+ # @return [Vips::Image] Output image
484
+
485
+ # @!method scale(, opts = {})
486
+ # Scale an image to uchar.
487
+ # @param [Hash] opts Set of options
488
+ # @option opts [Boolean] :log Log scale
489
+ # @option opts [Float] :exp Exponent for log scale
490
+ # @return [Vips::Image] Output image
491
+
492
+ # @!method wrap(, opts = {})
493
+ # Wrap image origin.
494
+ # @param [Hash] opts Set of options
495
+ # @option opts [Integer] :x Left edge of input in output
496
+ # @option opts [Integer] :y Top edge of input in output
497
+ # @return [Vips::Image] Output image
498
+
499
+ # @!method zoom(xfac, yfac, opts = {})
500
+ # Zoom an image.
501
+ # @param xfac [Integer] Horizontal zoom factor
502
+ # @param yfac [Integer] Vertical zoom factor
503
+ # @param [Hash] opts Set of options
504
+ # @return [Vips::Image] Output image
505
+
506
+ # @!method subsample(xfac, yfac, opts = {})
507
+ # Subsample an image.
508
+ # @param xfac [Integer] Horizontal subsample factor
509
+ # @param yfac [Integer] Vertical subsample factor
510
+ # @param [Hash] opts Set of options
511
+ # @option opts [Boolean] :point Point sample
512
+ # @return [Vips::Image] Output image
513
+
514
+ # @!method msb(, opts = {})
515
+ # Pick most-significant byte from an image.
516
+ # @param [Hash] opts Set of options
517
+ # @option opts [Integer] :band Band to msb
518
+ # @return [Vips::Image] Output image
519
+
520
+ # @!method byteswap(, opts = {})
521
+ # Byteswap an image.
522
+ # @param [Hash] opts Set of options
523
+ # @return [Vips::Image] Output image
524
+
525
+ # @!method falsecolour(, opts = {})
526
+ # False-colour an image.
527
+ # @param [Hash] opts Set of options
528
+ # @return [Vips::Image] Output image
529
+
530
+ # @!method gamma(, opts = {})
531
+ # Gamma an image.
532
+ # @param [Hash] opts Set of options
533
+ # @option opts [Float] :exponent Gamma factor
534
+ # @return [Vips::Image] Output image
535
+
536
+ # @!method self.black(width, height, opts = {})
537
+ # Make a black image.
538
+ # @param width [Integer] Image width in pixels
539
+ # @param height [Integer] Image height in pixels
540
+ # @param [Hash] opts Set of options
541
+ # @option opts [Integer] :bands Number of bands in image
542
+ # @return [Vips::Image] Output image
543
+
544
+ # @!method self.gaussnoise(width, height, opts = {})
545
+ # Make a gaussnoise image.
546
+ # @param width [Integer] Image width in pixels
547
+ # @param height [Integer] Image height in pixels
548
+ # @param [Hash] opts Set of options
549
+ # @option opts [Float] :mean Mean of pixels in generated image
550
+ # @option opts [Float] :sigma Standard deviation of pixels in generated image
551
+ # @return [Vips::Image] Output image
552
+
553
+ # @!method self.text(text, opts = {})
554
+ # Make a text image.
555
+ # @param text [String] Text to render
556
+ # @param [Hash] opts Set of options
557
+ # @option opts [String] :font Font to render width
558
+ # @option opts [Integer] :width Maximum image width in pixels
559
+ # @option opts [Vips::Align] :align Align on the low, centre or high edge
560
+ # @option opts [Integer] :dpi DPI to render at
561
+ # @option opts [Integer] :spacing Line spacing
562
+ # @return [Vips::Image] Output image
563
+
564
+ # @!method self.xyz(width, height, opts = {})
565
+ # Make an image where pixel values are coordinates.
566
+ # @param width [Integer] Image width in pixels
567
+ # @param height [Integer] Image height in pixels
568
+ # @param [Hash] opts Set of options
569
+ # @option opts [Integer] :csize Size of third dimension
570
+ # @option opts [Integer] :dsize Size of fourth dimension
571
+ # @option opts [Integer] :esize Size of fifth dimension
572
+ # @return [Vips::Image] Output image
573
+
574
+ # @!method self.gaussmat(sigma, min_ampl, opts = {})
575
+ # Make a gaussian image.
576
+ # @param sigma [Float] Sigma of Gaussian
577
+ # @param min_ampl [Float] Minimum amplitude of Gaussian
578
+ # @param [Hash] opts Set of options
579
+ # @option opts [Boolean] :separable Generate separable Gaussian
580
+ # @option opts [Vips::Precision] :precision Generate with this precision
581
+ # @return [Vips::Image] Output image
582
+
583
+ # @!method self.logmat(sigma, min_ampl, opts = {})
584
+ # Make a laplacian of gaussian image.
585
+ # @param sigma [Float] Radius of Logmatian
586
+ # @param min_ampl [Float] Minimum amplitude of Logmatian
587
+ # @param [Hash] opts Set of options
588
+ # @option opts [Boolean] :separable Generate separable Logmatian
589
+ # @option opts [Vips::Precision] :precision Generate with this precision
590
+ # @return [Vips::Image] Output image
591
+
592
+ # @!method self.eye(width, height, opts = {})
593
+ # Make an image showing the eye's spatial response.
594
+ # @param width [Integer] Image width in pixels
595
+ # @param height [Integer] Image height in pixels
596
+ # @param [Hash] opts Set of options
597
+ # @option opts [Boolean] :uchar Output an unsigned char image
598
+ # @option opts [Float] :factor Maximum spatial frequency
599
+ # @return [Vips::Image] Output image
600
+
601
+ # @!method self.grey(width, height, opts = {})
602
+ # Make a grey ramp image.
603
+ # @param width [Integer] Image width in pixels
604
+ # @param height [Integer] Image height in pixels
605
+ # @param [Hash] opts Set of options
606
+ # @option opts [Boolean] :uchar Output an unsigned char image
607
+ # @return [Vips::Image] Output image
608
+
609
+ # @!method self.zone(width, height, opts = {})
610
+ # Make a zone plate.
611
+ # @param width [Integer] Image width in pixels
612
+ # @param height [Integer] Image height in pixels
613
+ # @param [Hash] opts Set of options
614
+ # @option opts [Boolean] :uchar Output an unsigned char image
615
+ # @return [Vips::Image] Output image
616
+
617
+ # @!method self.sines(width, height, opts = {})
618
+ # Make a 2d sine wave.
619
+ # @param width [Integer] Image width in pixels
620
+ # @param height [Integer] Image height in pixels
621
+ # @param [Hash] opts Set of options
622
+ # @option opts [Boolean] :uchar Output an unsigned char image
623
+ # @option opts [Float] :hfreq Horizontal spatial frequency
624
+ # @option opts [Float] :vfreq Vertical spatial frequency
625
+ # @return [Vips::Image] Output image
626
+
627
+ # @!method self.mask_ideal(width, height, frequency_cutoff, opts = {})
628
+ # Make an ideal filter.
629
+ # @param width [Integer] Image width in pixels
630
+ # @param height [Integer] Image height in pixels
631
+ # @param frequency_cutoff [Float] Frequency cutoff
632
+ # @param [Hash] opts Set of options
633
+ # @option opts [Boolean] :uchar Output an unsigned char image
634
+ # @option opts [Boolean] :nodc Remove DC component
635
+ # @option opts [Boolean] :reject Invert the sense of the filter
636
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
637
+ # @return [Vips::Image] Output image
638
+
639
+ # @!method self.mask_ideal_ring(width, height, frequency_cutoff, ringwidth, opts = {})
640
+ # Make an ideal ring filter.
641
+ # @param width [Integer] Image width in pixels
642
+ # @param height [Integer] Image height in pixels
643
+ # @param frequency_cutoff [Float] Frequency cutoff
644
+ # @param ringwidth [Float] Ringwidth
645
+ # @param [Hash] opts Set of options
646
+ # @option opts [Boolean] :uchar Output an unsigned char image
647
+ # @option opts [Boolean] :nodc Remove DC component
648
+ # @option opts [Boolean] :reject Invert the sense of the filter
649
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
650
+ # @return [Vips::Image] Output image
651
+
652
+ # @!method self.mask_ideal_band(width, height, frequency_cutoff_x, frequency_cutoff_y, radius, opts = {})
653
+ # Make an ideal band filter.
654
+ # @param width [Integer] Image width in pixels
655
+ # @param height [Integer] Image height in pixels
656
+ # @param frequency_cutoff_x [Float] Frequency cutoff x
657
+ # @param frequency_cutoff_y [Float] Frequency cutoff y
658
+ # @param radius [Float] radius of circle
659
+ # @param [Hash] opts Set of options
660
+ # @option opts [Boolean] :uchar Output an unsigned char image
661
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
662
+ # @option opts [Boolean] :nodc Remove DC component
663
+ # @option opts [Boolean] :reject Invert the sense of the filter
664
+ # @return [Vips::Image] Output image
665
+
666
+ # @!method self.mask_butterworth(width, height, order, frequency_cutoff, amplitude_cutoff, opts = {})
667
+ # Make a butterworth filter.
668
+ # @param width [Integer] Image width in pixels
669
+ # @param height [Integer] Image height in pixels
670
+ # @param order [Float] Filter order
671
+ # @param frequency_cutoff [Float] Frequency cutoff
672
+ # @param amplitude_cutoff [Float] Amplitude cutoff
673
+ # @param [Hash] opts Set of options
674
+ # @option opts [Boolean] :uchar Output an unsigned char image
675
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
676
+ # @option opts [Boolean] :nodc Remove DC component
677
+ # @option opts [Boolean] :reject Invert the sense of the filter
678
+ # @return [Vips::Image] Output image
679
+
680
+ # @!method self.mask_butterworth_ring(width, height, order, frequency_cutoff, amplitude_cutoff, ringwidth, opts = {})
681
+ # Make a butterworth ring filter.
682
+ # @param width [Integer] Image width in pixels
683
+ # @param height [Integer] Image height in pixels
684
+ # @param order [Float] Filter order
685
+ # @param frequency_cutoff [Float] Frequency cutoff
686
+ # @param amplitude_cutoff [Float] Amplitude cutoff
687
+ # @param ringwidth [Float] Ringwidth
688
+ # @param [Hash] opts Set of options
689
+ # @option opts [Boolean] :uchar Output an unsigned char image
690
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
691
+ # @option opts [Boolean] :nodc Remove DC component
692
+ # @option opts [Boolean] :reject Invert the sense of the filter
693
+ # @return [Vips::Image] Output image
694
+
695
+ # @!method self.mask_butterworth_band(width, height, order, frequency_cutoff_x, frequency_cutoff_y, radius, amplitude_cutoff, opts = {})
696
+ # Make a butterworth_band filter.
697
+ # @param width [Integer] Image width in pixels
698
+ # @param height [Integer] Image height in pixels
699
+ # @param order [Float] Filter order
700
+ # @param frequency_cutoff_x [Float] Frequency cutoff x
701
+ # @param frequency_cutoff_y [Float] Frequency cutoff y
702
+ # @param radius [Float] radius of circle
703
+ # @param amplitude_cutoff [Float] Amplitude cutoff
704
+ # @param [Hash] opts Set of options
705
+ # @option opts [Boolean] :uchar Output an unsigned char image
706
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
707
+ # @option opts [Boolean] :reject Invert the sense of the filter
708
+ # @option opts [Boolean] :nodc Remove DC component
709
+ # @return [Vips::Image] Output image
710
+
711
+ # @!method self.mask_gaussian(width, height, frequency_cutoff, amplitude_cutoff, opts = {})
712
+ # Make a gaussian filter.
713
+ # @param width [Integer] Image width in pixels
714
+ # @param height [Integer] Image height in pixels
715
+ # @param frequency_cutoff [Float] Frequency cutoff
716
+ # @param amplitude_cutoff [Float] Amplitude cutoff
717
+ # @param [Hash] opts Set of options
718
+ # @option opts [Boolean] :uchar Output an unsigned char image
719
+ # @option opts [Boolean] :nodc Remove DC component
720
+ # @option opts [Boolean] :reject Invert the sense of the filter
721
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
722
+ # @return [Vips::Image] Output image
723
+
724
+ # @!method self.mask_gaussian_ring(width, height, frequency_cutoff, amplitude_cutoff, ringwidth, opts = {})
725
+ # Make a gaussian ring filter.
726
+ # @param width [Integer] Image width in pixels
727
+ # @param height [Integer] Image height in pixels
728
+ # @param frequency_cutoff [Float] Frequency cutoff
729
+ # @param amplitude_cutoff [Float] Amplitude cutoff
730
+ # @param ringwidth [Float] Ringwidth
731
+ # @param [Hash] opts Set of options
732
+ # @option opts [Boolean] :uchar Output an unsigned char image
733
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
734
+ # @option opts [Boolean] :nodc Remove DC component
735
+ # @option opts [Boolean] :reject Invert the sense of the filter
736
+ # @return [Vips::Image] Output image
737
+
738
+ # @!method self.mask_gaussian_band(width, height, frequency_cutoff_x, frequency_cutoff_y, radius, amplitude_cutoff, opts = {})
739
+ # Make a gaussian filter.
740
+ # @param width [Integer] Image width in pixels
741
+ # @param height [Integer] Image height in pixels
742
+ # @param frequency_cutoff_x [Float] Frequency cutoff x
743
+ # @param frequency_cutoff_y [Float] Frequency cutoff y
744
+ # @param radius [Float] radius of circle
745
+ # @param amplitude_cutoff [Float] Amplitude cutoff
746
+ # @param [Hash] opts Set of options
747
+ # @option opts [Boolean] :uchar Output an unsigned char image
748
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
749
+ # @option opts [Boolean] :nodc Remove DC component
750
+ # @option opts [Boolean] :reject Invert the sense of the filter
751
+ # @return [Vips::Image] Output image
752
+
753
+ # @!method self.mask_fractal(width, height, fractal_dimension, opts = {})
754
+ # Make fractal filter.
755
+ # @param width [Integer] Image width in pixels
756
+ # @param height [Integer] Image height in pixels
757
+ # @param fractal_dimension [Float] Fractal dimension
758
+ # @param [Hash] opts Set of options
759
+ # @option opts [Boolean] :uchar Output an unsigned char image
760
+ # @option opts [Boolean] :nodc Remove DC component
761
+ # @option opts [Boolean] :reject Invert the sense of the filter
762
+ # @option opts [Boolean] :optical Rotate quadrants to optical space
763
+ # @return [Vips::Image] Output image
764
+
765
+ # @!method buildlut(, opts = {})
766
+ # Build a look-up table.
767
+ # @param [Hash] opts Set of options
768
+ # @return [Vips::Image] Output image
769
+
770
+ # @!method invertlut(, opts = {})
771
+ # Build an inverted look-up table.
772
+ # @param [Hash] opts Set of options
773
+ # @option opts [Integer] :size LUT size to generate
774
+ # @return [Vips::Image] Output image
775
+
776
+ # @!method self.tonelut(, opts = {})
777
+ # Build a look-up table.
778
+ # @param [Hash] opts Set of options
779
+ # @option opts [Integer] :in_max Size of LUT to build
780
+ # @option opts [Integer] :out_max Maximum value in output LUT
781
+ # @option opts [Float] :Lb Lowest value in output
782
+ # @option opts [Float] :Lw Highest value in output
783
+ # @option opts [Float] :Ps Position of shadow
784
+ # @option opts [Float] :Pm Position of mid-tones
785
+ # @option opts [Float] :Ph Position of highlights
786
+ # @option opts [Float] :S Adjust shadows by this much
787
+ # @option opts [Float] :M Adjust mid-tones by this much
788
+ # @option opts [Float] :H Adjust highlights by this much
789
+ # @return [Vips::Image] Output image
790
+
791
+ # @!method self.identity(, opts = {})
792
+ # Make a 1d image where pixel values are indexes.
793
+ # @param [Hash] opts Set of options
794
+ # @option opts [Integer] :bands Number of bands in LUT
795
+ # @option opts [Boolean] :ushort Create a 16-bit LUT
796
+ # @option opts [Integer] :size Size of 16-bit LUT
797
+ # @return [Vips::Image] Output image
798
+
799
+ # @!method self.fractsurf(width, height, fractal_dimension, opts = {})
800
+ # Make a fractal surface.
801
+ # @param width [Integer] Image width in pixels
802
+ # @param height [Integer] Image height in pixels
803
+ # @param fractal_dimension [Float] Fractal dimension
804
+ # @param [Hash] opts Set of options
805
+ # @return [Vips::Image] Output image
806
+
807
+ # @!method self.radload(filename, opts = {})
808
+ # Load a radiance image from a file.
809
+ # @param filename [String] Filename to load from
810
+ # @param [Hash] opts Set of options
811
+ # @option opts [Boolean] :disc Open to disc
812
+ # @option opts [Vips::Access] :access Required access pattern for this file
813
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
814
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
815
+
816
+ # @!method self.ppmload(filename, opts = {})
817
+ # Load ppm from file.
818
+ # @param filename [String] Filename to load from
819
+ # @param [Hash] opts Set of options
820
+ # @option opts [Boolean] :disc Open to disc
821
+ # @option opts [Vips::Access] :access Required access pattern for this file
822
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
823
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
824
+
825
+ # @!method self.csvload(filename, opts = {})
826
+ # Load csv from file.
827
+ # @param filename [String] Filename to load from
828
+ # @param [Hash] opts Set of options
829
+ # @option opts [Boolean] :disc Open to disc
830
+ # @option opts [Vips::Access] :access Required access pattern for this file
831
+ # @option opts [Integer] :skip Skip this many lines at the start of the file
832
+ # @option opts [Integer] :lines Read this many lines from the file
833
+ # @option opts [String] :whitespace Set of whitespace characters
834
+ # @option opts [String] :separator Set of separator characters
835
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
836
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
837
+
838
+ # @!method self.matrixload(filename, opts = {})
839
+ # Load matrix from file.
840
+ # @param filename [String] Filename to load from
841
+ # @param [Hash] opts Set of options
842
+ # @option opts [Boolean] :disc Open to disc
843
+ # @option opts [Vips::Access] :access Required access pattern for this file
844
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
845
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
846
+
847
+ # @!method self.analyzeload(filename, opts = {})
848
+ # Load an analyze6 image.
849
+ # @param filename [String] Filename to load from
850
+ # @param [Hash] opts Set of options
851
+ # @option opts [Boolean] :disc Open to disc
852
+ # @option opts [Vips::Access] :access Required access pattern for this file
853
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
854
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
855
+
856
+ # @!method self.rawload(filename, width, height, bands, opts = {})
857
+ # Load raw data from a file.
858
+ # @param filename [String] Filename to load from
859
+ # @param width [Integer] Image width in pixels
860
+ # @param height [Integer] Image height in pixels
861
+ # @param bands [Integer] Number of bands in image
862
+ # @param [Hash] opts Set of options
863
+ # @option opts [Boolean] :disc Open to disc
864
+ # @option opts [Vips::Access] :access Required access pattern for this file
865
+ # @option opts [Integer] :offset Offset in bytes from start of file
866
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
867
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
868
+
869
+ # @!method self.vipsload(filename, opts = {})
870
+ # Load vips from file.
871
+ # @param filename [String] Filename to load from
872
+ # @param [Hash] opts Set of options
873
+ # @option opts [Boolean] :disc Open to disc
874
+ # @option opts [Vips::Access] :access Required access pattern for this file
875
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
876
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
877
+
878
+ # @!method self.pngload(filename, opts = {})
879
+ # Load png from file.
880
+ # @param filename [String] Filename to load from
881
+ # @param [Hash] opts Set of options
882
+ # @option opts [Boolean] :disc Open to disc
883
+ # @option opts [Vips::Access] :access Required access pattern for this file
884
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
885
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
886
+
887
+ # @!method self.pngload_buffer(buffer, opts = {})
888
+ # Load png from buffer.
889
+ # @param buffer [Vips::Blob] Buffer to load from
890
+ # @param [Hash] opts Set of options
891
+ # @option opts [Boolean] :disc Open to disc
892
+ # @option opts [Vips::Access] :access Required access pattern for this file
893
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
894
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
895
+
896
+ # @!method self.matload(filename, opts = {})
897
+ # Load mat from file.
898
+ # @param filename [String] Filename to load from
899
+ # @param [Hash] opts Set of options
900
+ # @option opts [Boolean] :disc Open to disc
901
+ # @option opts [Vips::Access] :access Required access pattern for this file
902
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
903
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
904
+
905
+ # @!method self.jpegload(filename, opts = {})
906
+ # Load jpeg from file.
907
+ # @param filename [String] Filename to load from
908
+ # @param [Hash] opts Set of options
909
+ # @option opts [Boolean] :disc Open to disc
910
+ # @option opts [Vips::Access] :access Required access pattern for this file
911
+ # @option opts [Integer] :shrink Shrink factor on load
912
+ # @option opts [Boolean] :fail Fail on first warning
913
+ # @option opts [Boolean] :autorotate Rotate image using exif orientation
914
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
915
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
916
+
917
+ # @!method self.jpegload_buffer(buffer, opts = {})
918
+ # Load jpeg from buffer.
919
+ # @param buffer [Vips::Blob] Buffer to load from
920
+ # @param [Hash] opts Set of options
921
+ # @option opts [Boolean] :disc Open to disc
922
+ # @option opts [Vips::Access] :access Required access pattern for this file
923
+ # @option opts [Integer] :shrink Shrink factor on load
924
+ # @option opts [Boolean] :fail Fail on first warning
925
+ # @option opts [Boolean] :autorotate Rotate image using exif orientation
926
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
927
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
928
+
929
+ # @!method self.webpload(filename, opts = {})
930
+ # Load webp from file.
931
+ # @param filename [String] Filename to load from
932
+ # @param [Hash] opts Set of options
933
+ # @option opts [Boolean] :disc Open to disc
934
+ # @option opts [Vips::Access] :access Required access pattern for this file
935
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
936
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
937
+
938
+ # @!method self.webpload_buffer(buffer, opts = {})
939
+ # Load webp from buffer.
940
+ # @param buffer [Vips::Blob] Buffer to load from
941
+ # @param [Hash] opts Set of options
942
+ # @option opts [Boolean] :disc Open to disc
943
+ # @option opts [Vips::Access] :access Required access pattern for this file
944
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
945
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
946
+
947
+ # @!method self.tiffload(filename, opts = {})
948
+ # Load tiff from file.
949
+ # @param filename [String] Filename to load from
950
+ # @param [Hash] opts Set of options
951
+ # @option opts [Boolean] :disc Open to disc
952
+ # @option opts [Vips::Access] :access Required access pattern for this file
953
+ # @option opts [Integer] :page Load this page from the image
954
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
955
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
956
+
957
+ # @!method self.tiffload_buffer(buffer, opts = {})
958
+ # Load tiff from buffer.
959
+ # @param buffer [Vips::Blob] Buffer to load from
960
+ # @param [Hash] opts Set of options
961
+ # @option opts [Boolean] :disc Open to disc
962
+ # @option opts [Vips::Access] :access Required access pattern for this file
963
+ # @option opts [Integer] :page Load this page from the image
964
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
965
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
966
+
967
+ # @!method self.openslideload(filename, opts = {})
968
+ # Load file with openslide.
969
+ # @param filename [String] Filename to load from
970
+ # @param [Hash] opts Set of options
971
+ # @option opts [Boolean] :disc Open to disc
972
+ # @option opts [Vips::Access] :access Required access pattern for this file
973
+ # @option opts [Integer] :level Load this level from the file
974
+ # @option opts [Boolean] :autocrop Crop to image bounds
975
+ # @option opts [String] :associated Load this associated image
976
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
977
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
978
+
979
+ # @!method self.magickload(filename, opts = {})
980
+ # Load file with imagemagick.
981
+ # @param filename [String] Filename to load from
982
+ # @param [Hash] opts Set of options
983
+ # @option opts [Boolean] :all_frames Read all frames from an image
984
+ # @option opts [String] :density Canvas resolution for rendering vector formats like SVG
985
+ # @option opts [Boolean] :disc Open to disc
986
+ # @option opts [Vips::Access] :access Required access pattern for this file
987
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
988
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
989
+
990
+ # @!method self.magickload_buffer(buffer, opts = {})
991
+ # Load buffer with imagemagick.
992
+ # @param buffer [Vips::Blob] Buffer to load from
993
+ # @param [Hash] opts Set of options
994
+ # @option opts [Boolean] :all_frames Read all frames from an image
995
+ # @option opts [String] :density Canvas resolution for rendering vector formats like SVG
996
+ # @option opts [Boolean] :disc Open to disc
997
+ # @option opts [Vips::Access] :access Required access pattern for this file
998
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
999
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
1000
+
1001
+ # @!method self.fitsload(filename, opts = {})
1002
+ # Load a fits image.
1003
+ # @param filename [String] Filename to load from
1004
+ # @param [Hash] opts Set of options
1005
+ # @option opts [Boolean] :disc Open to disc
1006
+ # @option opts [Vips::Access] :access Required access pattern for this file
1007
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
1008
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
1009
+
1010
+ # @!method self.openexrload(filename, opts = {})
1011
+ # Load an openexr image.
1012
+ # @param filename [String] Filename to load from
1013
+ # @param [Hash] opts Set of options
1014
+ # @option opts [Boolean] :disc Open to disc
1015
+ # @option opts [Vips::Access] :access Required access pattern for this file
1016
+ # @option opts [Vips::ForeignFlags] :flags Output -- Flags for this file
1017
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
1018
+
1019
+ # @!method radsave(filename, opts = {})
1020
+ # Save image to radiance file.
1021
+ # @param filename [String] Filename to save to
1022
+ # @param [Hash] opts Set of options
1023
+ # @option opts [Boolean] :strip Strip all metadata from image
1024
+ # @option opts [Array<Double>] :background Background value
1025
+ # @return [nil]
1026
+
1027
+ # @!method ppmsave(filename, opts = {})
1028
+ # Save image to ppm file.
1029
+ # @param filename [String] Filename to save to
1030
+ # @param [Hash] opts Set of options
1031
+ # @option opts [Boolean] :ascii save as ascii
1032
+ # @option opts [Boolean] :squash save as one bit
1033
+ # @option opts [Boolean] :strip Strip all metadata from image
1034
+ # @option opts [Array<Double>] :background Background value
1035
+ # @return [nil]
1036
+
1037
+ # @!method csvsave(filename, opts = {})
1038
+ # Save image to csv file.
1039
+ # @param filename [String] Filename to save to
1040
+ # @param [Hash] opts Set of options
1041
+ # @option opts [String] :separator Separator characters
1042
+ # @option opts [Boolean] :strip Strip all metadata from image
1043
+ # @option opts [Array<Double>] :background Background value
1044
+ # @return [nil]
1045
+
1046
+ # @!method matrixsave(filename, opts = {})
1047
+ # Save image to matrix file.
1048
+ # @param filename [String] Filename to save to
1049
+ # @param [Hash] opts Set of options
1050
+ # @option opts [Boolean] :strip Strip all metadata from image
1051
+ # @option opts [Array<Double>] :background Background value
1052
+ # @return [nil]
1053
+
1054
+ # @!method matrixprint(, opts = {})
1055
+ # Print matrix.
1056
+ # @param [Hash] opts Set of options
1057
+ # @option opts [Boolean] :strip Strip all metadata from image
1058
+ # @option opts [Array<Double>] :background Background value
1059
+ # @return [nil]
1060
+
1061
+ # @!method rawsave(filename, opts = {})
1062
+ # Save image to raw file.
1063
+ # @param filename [String] Filename to save to
1064
+ # @param [Hash] opts Set of options
1065
+ # @option opts [Boolean] :strip Strip all metadata from image
1066
+ # @option opts [Array<Double>] :background Background value
1067
+ # @return [nil]
1068
+
1069
+ # @!method rawsave_fd(fd, opts = {})
1070
+ # Write raw image to file descriptor.
1071
+ # @param fd [Integer] File descriptor to write to
1072
+ # @param [Hash] opts Set of options
1073
+ # @option opts [Boolean] :strip Strip all metadata from image
1074
+ # @option opts [Array<Double>] :background Background value
1075
+ # @return [nil]
1076
+
1077
+ # @!method vipssave(filename, opts = {})
1078
+ # Save image to vips file.
1079
+ # @param filename [String] Filename to save to
1080
+ # @param [Hash] opts Set of options
1081
+ # @option opts [Boolean] :strip Strip all metadata from image
1082
+ # @option opts [Array<Double>] :background Background value
1083
+ # @return [nil]
1084
+
1085
+ # @!method dzsave(filename, opts = {})
1086
+ # Save image to deep zoom format.
1087
+ # @param filename [String] Filename to save to
1088
+ # @param [Hash] opts Set of options
1089
+ # @option opts [Vips::ForeignDzLayout] :layout Directory layout
1090
+ # @option opts [String] :suffix Filename suffix for tiles
1091
+ # @option opts [Integer] :overlap Tile overlap in pixels
1092
+ # @option opts [Integer] :tile_size Tile size in pixels
1093
+ # @option opts [Boolean] :centre Center image in tile
1094
+ # @option opts [Vips::ForeignDzDepth] :depth Pyramid depth
1095
+ # @option opts [Vips::Angle] :angle Rotate image during save
1096
+ # @option opts [Vips::ForeignDzContainer] :container Pyramid container type
1097
+ # @option opts [Boolean] :properties Write a properties file to the output directory
1098
+ # @option opts [Boolean] :strip Strip all metadata from image
1099
+ # @option opts [Array<Double>] :background Background value
1100
+ # @return [nil]
1101
+
1102
+ # @!method pngsave(filename, opts = {})
1103
+ # Save image to png file.
1104
+ # @param filename [String] Filename to save to
1105
+ # @param [Hash] opts Set of options
1106
+ # @option opts [Integer] :compression Compression factor
1107
+ # @option opts [Boolean] :interlace Interlace image
1108
+ # @option opts [String] :profile ICC profile to embed
1109
+ # @option opts [Vips::ForeignPngFilter] :filter libpng row filter flag(s)
1110
+ # @option opts [Boolean] :strip Strip all metadata from image
1111
+ # @option opts [Array<Double>] :background Background value
1112
+ # @return [nil]
1113
+
1114
+ # @!method pngsave_buffer(, opts = {})
1115
+ # Save image to png buffer.
1116
+ # @param [Hash] opts Set of options
1117
+ # @option opts [Integer] :compression Compression factor
1118
+ # @option opts [Boolean] :interlace Interlace image
1119
+ # @option opts [String] :profile ICC profile to embed
1120
+ # @option opts [Vips::ForeignPngFilter] :filter libpng row filter flag(s)
1121
+ # @option opts [Boolean] :strip Strip all metadata from image
1122
+ # @option opts [Array<Double>] :background Background value
1123
+ # @return [Vips::Blob] Buffer to save to
1124
+
1125
+ # @!method jpegsave(filename, opts = {})
1126
+ # Save image to jpeg file.
1127
+ # @param filename [String] Filename to save to
1128
+ # @param [Hash] opts Set of options
1129
+ # @option opts [Integer] :Q Q factor
1130
+ # @option opts [String] :profile ICC profile to embed
1131
+ # @option opts [Boolean] :optimize_coding Compute optimal Huffman coding tables
1132
+ # @option opts [Boolean] :interlace Generate an interlaced (progressive) jpeg
1133
+ # @option opts [Boolean] :no_subsample Disable chroma subsample
1134
+ # @option opts [Boolean] :trellis_quant Apply trellis quantisation to each 8x8 block
1135
+ # @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
1136
+ # @option opts [Boolean] :optimize_scans Split the spectrum of DCT coefficients into separate scans
1137
+ # @option opts [Boolean] :strip Strip all metadata from image
1138
+ # @option opts [Array<Double>] :background Background value
1139
+ # @return [nil]
1140
+
1141
+ # @!method jpegsave_buffer(, opts = {})
1142
+ # Save image to jpeg buffer.
1143
+ # @param [Hash] opts Set of options
1144
+ # @option opts [Integer] :Q Q factor
1145
+ # @option opts [String] :profile ICC profile to embed
1146
+ # @option opts [Boolean] :optimize_coding Compute optimal Huffman coding tables
1147
+ # @option opts [Boolean] :interlace Generate an interlaced (progressive) jpeg
1148
+ # @option opts [Boolean] :no_subsample Disable chroma subsample
1149
+ # @option opts [Boolean] :trellis_quant Apply trellis quantisation to each 8x8 block
1150
+ # @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
1151
+ # @option opts [Boolean] :optimize_scans Split the spectrum of DCT coefficients into separate scans
1152
+ # @option opts [Boolean] :strip Strip all metadata from image
1153
+ # @option opts [Array<Double>] :background Background value
1154
+ # @return [Vips::Blob] Buffer to save to
1155
+
1156
+ # @!method jpegsave_mime(, opts = {})
1157
+ # Save image to jpeg mime.
1158
+ # @param [Hash] opts Set of options
1159
+ # @option opts [Integer] :Q Q factor
1160
+ # @option opts [String] :profile ICC profile to embed
1161
+ # @option opts [Boolean] :optimize_coding Compute optimal Huffman coding tables
1162
+ # @option opts [Boolean] :interlace Generate an interlaced (progressive) jpeg
1163
+ # @option opts [Boolean] :no_subsample Disable chroma subsample
1164
+ # @option opts [Boolean] :trellis_quant Apply trellis quantisation to each 8x8 block
1165
+ # @option opts [Boolean] :overshoot_deringing Apply overshooting to samples with extreme values
1166
+ # @option opts [Boolean] :optimize_scans Split the spectrum of DCT coefficients into separate scans
1167
+ # @option opts [Boolean] :strip Strip all metadata from image
1168
+ # @option opts [Array<Double>] :background Background value
1169
+ # @return [nil]
1170
+
1171
+ # @!method webpsave(filename, opts = {})
1172
+ # Save image to webp file.
1173
+ # @param filename [String] Filename to save to
1174
+ # @param [Hash] opts Set of options
1175
+ # @option opts [Integer] :Q Q factor
1176
+ # @option opts [Boolean] :lossless enable lossless compression
1177
+ # @option opts [Boolean] :strip Strip all metadata from image
1178
+ # @option opts [Array<Double>] :background Background value
1179
+ # @return [nil]
1180
+
1181
+ # @!method webpsave_buffer(, opts = {})
1182
+ # Save image to webp buffer.
1183
+ # @param [Hash] opts Set of options
1184
+ # @option opts [Integer] :Q Q factor
1185
+ # @option opts [Boolean] :lossless enable lossless compression
1186
+ # @option opts [Boolean] :strip Strip all metadata from image
1187
+ # @option opts [Array<Double>] :background Background value
1188
+ # @return [Vips::Blob] Buffer to save to
1189
+
1190
+ # @!method tiffsave(filename, opts = {})
1191
+ # Save image to tiff file.
1192
+ # @param filename [String] Filename to save to
1193
+ # @param [Hash] opts Set of options
1194
+ # @option opts [Vips::ForeignTiffCompression] :compression Compression for this file
1195
+ # @option opts [Integer] :Q Q factor
1196
+ # @option opts [Vips::ForeignTiffPredictor] :predictor Compression prediction
1197
+ # @option opts [String] :profile ICC profile to embed
1198
+ # @option opts [Boolean] :tile Write a tiled tiff
1199
+ # @option opts [Integer] :tile_width Tile width in pixels
1200
+ # @option opts [Integer] :tile_height Tile height in pixels
1201
+ # @option opts [Boolean] :pyramid Write a pyramidal tiff
1202
+ # @option opts [Boolean] :miniswhite Use 0 for white in 1-bit images
1203
+ # @option opts [Boolean] :squash Squash images down to 1 bit
1204
+ # @option opts [Vips::ForeignTiffResunit] :resunit Resolution unit
1205
+ # @option opts [Float] :xres Horizontal resolution in pixels/mm
1206
+ # @option opts [Float] :yres Vertical resolution in pixels/mm
1207
+ # @option opts [Boolean] :bigtiff Write a bigtiff image
1208
+ # @option opts [Boolean] :properties Write a properties document to IMAGEDESCRIPTION
1209
+ # @option opts [Boolean] :strip Strip all metadata from image
1210
+ # @option opts [Array<Double>] :background Background value
1211
+ # @return [nil]
1212
+
1213
+ # @!method fitssave(filename, opts = {})
1214
+ # Save image to fits file.
1215
+ # @param filename [String] Filename to save to
1216
+ # @param [Hash] opts Set of options
1217
+ # @option opts [Boolean] :strip Strip all metadata from image
1218
+ # @option opts [Array<Double>] :background Background value
1219
+ # @return [nil]
1220
+
1221
+ # @!method mapim(index, opts = {})
1222
+ # Resample with an mapim image.
1223
+ # @param index [Vips::Image] Index pixels with this
1224
+ # @param [Hash] opts Set of options
1225
+ # @option opts [Vips::Interpolate] :interpolate Interpolate pixels with this
1226
+ # @return [Vips::Image] Output image
1227
+
1228
+ # @!method shrink(xshrink, yshrink, opts = {})
1229
+ # Shrink an image.
1230
+ # @param xshrink [Float] Horizontal shrink factor
1231
+ # @param yshrink [Float] Vertical shrink factor
1232
+ # @param [Hash] opts Set of options
1233
+ # @return [Vips::Image] Output image
1234
+
1235
+ # @!method shrinkh(xshrink, opts = {})
1236
+ # Shrink an image horizontally.
1237
+ # @param xshrink [Integer] Horizontal shrink factor
1238
+ # @param [Hash] opts Set of options
1239
+ # @return [Vips::Image] Output image
1240
+
1241
+ # @!method shrinkv(yshrink, opts = {})
1242
+ # Shrink an image vertically.
1243
+ # @param yshrink [Integer] Vertical shrink factor
1244
+ # @param [Hash] opts Set of options
1245
+ # @return [Vips::Image] Output image
1246
+
1247
+ # @!method shrink2(xshrink, yshrink, opts = {})
1248
+ # Shrink an image.
1249
+ # @param xshrink [Float] Horizontal shrink factor
1250
+ # @param yshrink [Float] Vertical shrink factor
1251
+ # @param [Hash] opts Set of options
1252
+ # @return [Vips::Image] Output image
1253
+
1254
+ # @!method quadratic(coeff, opts = {})
1255
+ # Resample an image with a quadratic transform.
1256
+ # @param coeff [Vips::Image] Coefficient matrix
1257
+ # @param [Hash] opts Set of options
1258
+ # @option opts [Vips::Interpolate] :interpolate Interpolate values with this
1259
+ # @return [Vips::Image] Output image
1260
+
1261
+ # @!method affine(matrix, opts = {})
1262
+ # Affine transform of an image.
1263
+ # @param matrix [Array<Double>] Transformation matrix
1264
+ # @param [Hash] opts Set of options
1265
+ # @option opts [Vips::Interpolate] :interpolate Interpolate pixels with this
1266
+ # @option opts [Array<Integer>] :oarea Area of output to generate
1267
+ # @option opts [Float] :odx Horizontal output displacement
1268
+ # @option opts [Float] :ody Vertical output displacement
1269
+ # @option opts [Float] :idx Horizontal input displacement
1270
+ # @option opts [Float] :idy Vertical input displacement
1271
+ # @return [Vips::Image] Output image
1272
+
1273
+ # @!method similarity(, opts = {})
1274
+ # Similarity transform of an image.
1275
+ # @param [Hash] opts Set of options
1276
+ # @option opts [Vips::Interpolate] :interpolate Interpolate pixels with this
1277
+ # @option opts [Float] :scale Scale by this factor
1278
+ # @option opts [Float] :angle Rotate anticlockwise by this many degrees
1279
+ # @option opts [Float] :odx Horizontal output displacement
1280
+ # @option opts [Float] :ody Vertical output displacement
1281
+ # @option opts [Float] :idx Horizontal input displacement
1282
+ # @option opts [Float] :idy Vertical input displacement
1283
+ # @return [Vips::Image] Output image
1284
+
1285
+ # @!method resize(scale, opts = {})
1286
+ # Resize an image.
1287
+ # @param scale [Float] Scale image by this factor
1288
+ # @param [Hash] opts Set of options
1289
+ # @option opts [Vips::Interpolate] :interpolate Interpolate pixels with this
1290
+ # @option opts [Float] :vscale Vertical scale image by this factor
1291
+ # @option opts [Float] :idx Horizontal input displacement
1292
+ # @option opts [Float] :idy Vertical input displacement
1293
+ # @return [Vips::Image] Output image
1294
+
1295
+ # @!method colourspace(space, opts = {})
1296
+ # Convert to a new colourspace.
1297
+ # @param space [Vips::Interpretation] Destination colour space
1298
+ # @param [Hash] opts Set of options
1299
+ # @option opts [Vips::Interpretation] :source_space Source colour space
1300
+ # @return [Vips::Image] Output image
1301
+
1302
+ # @!method Lab2XYZ(, opts = {})
1303
+ # Transform cielab to xyz.
1304
+ # @param [Hash] opts Set of options
1305
+ # @option opts [Array<Double>] :temp Colour temperature
1306
+ # @return [Vips::Image] Output image
1307
+
1308
+ # @!method XYZ2Lab(, opts = {})
1309
+ # Transform xyz to lab.
1310
+ # @param [Hash] opts Set of options
1311
+ # @option opts [Array<Double>] :temp Colour temperature
1312
+ # @return [Vips::Image] Output image
1313
+
1314
+ # @!method Lab2LCh(, opts = {})
1315
+ # Transform lab to lch.
1316
+ # @param [Hash] opts Set of options
1317
+ # @return [Vips::Image] Output image
1318
+
1319
+ # @!method LCh2Lab(, opts = {})
1320
+ # Transform lch to lab.
1321
+ # @param [Hash] opts Set of options
1322
+ # @return [Vips::Image] Output image
1323
+
1324
+ # @!method LCh2CMC(, opts = {})
1325
+ # Transform lch to cmc.
1326
+ # @param [Hash] opts Set of options
1327
+ # @return [Vips::Image] Output image
1328
+
1329
+ # @!method CMC2LCh(, opts = {})
1330
+ # Transform lch to cmc.
1331
+ # @param [Hash] opts Set of options
1332
+ # @return [Vips::Image] Output image
1333
+
1334
+ # @!method XYZ2Yxy(, opts = {})
1335
+ # Transform xyz to yxy.
1336
+ # @param [Hash] opts Set of options
1337
+ # @return [Vips::Image] Output image
1338
+
1339
+ # @!method Yxy2XYZ(, opts = {})
1340
+ # Transform yxy to xyz.
1341
+ # @param [Hash] opts Set of options
1342
+ # @return [Vips::Image] Output image
1343
+
1344
+ # @!method scRGB2XYZ(, opts = {})
1345
+ # Transform scrgb to xyz.
1346
+ # @param [Hash] opts Set of options
1347
+ # @return [Vips::Image] Output image
1348
+
1349
+ # @!method XYZ2scRGB(, opts = {})
1350
+ # Transform xyz to scrgb.
1351
+ # @param [Hash] opts Set of options
1352
+ # @return [Vips::Image] Output image
1353
+
1354
+ # @!method LabQ2Lab(, opts = {})
1355
+ # Unpack a labq image to float lab.
1356
+ # @param [Hash] opts Set of options
1357
+ # @return [Vips::Image] Output image
1358
+
1359
+ # @!method Lab2LabQ(, opts = {})
1360
+ # Transform float lab to labq coding.
1361
+ # @param [Hash] opts Set of options
1362
+ # @return [Vips::Image] Output image
1363
+
1364
+ # @!method LabQ2LabS(, opts = {})
1365
+ # Unpack a labq image to short lab.
1366
+ # @param [Hash] opts Set of options
1367
+ # @return [Vips::Image] Output image
1368
+
1369
+ # @!method LabS2LabQ(, opts = {})
1370
+ # Transform short lab to labq coding.
1371
+ # @param [Hash] opts Set of options
1372
+ # @return [Vips::Image] Output image
1373
+
1374
+ # @!method LabS2Lab(, opts = {})
1375
+ # Transform signed short lab to float.
1376
+ # @param [Hash] opts Set of options
1377
+ # @return [Vips::Image] Output image
1378
+
1379
+ # @!method Lab2LabS(, opts = {})
1380
+ # Transform float lab to signed short.
1381
+ # @param [Hash] opts Set of options
1382
+ # @return [Vips::Image] Output image
1383
+
1384
+ # @!method rad2float(, opts = {})
1385
+ # Unpack radiance coding to float rgb.
1386
+ # @param [Hash] opts Set of options
1387
+ # @return [Vips::Image] Output image
1388
+
1389
+ # @!method float2rad(, opts = {})
1390
+ # Transform float rgb to radiance coding.
1391
+ # @param [Hash] opts Set of options
1392
+ # @return [Vips::Image] Output image
1393
+
1394
+ # @!method LabQ2sRGB(, opts = {})
1395
+ # Convert a labq image to srgb.
1396
+ # @param [Hash] opts Set of options
1397
+ # @return [Vips::Image] Output image
1398
+
1399
+ # @!method sRGB2HSV(, opts = {})
1400
+ # Transform srgb to hsv.
1401
+ # @param [Hash] opts Set of options
1402
+ # @return [Vips::Image] Output image
1403
+
1404
+ # @!method HSV2sRGB(, opts = {})
1405
+ # Transform hsv to srgb.
1406
+ # @param [Hash] opts Set of options
1407
+ # @return [Vips::Image] Output image
1408
+
1409
+ # @!method icc_import(, opts = {})
1410
+ # Import from device with icc profile.
1411
+ # @param [Hash] opts Set of options
1412
+ # @option opts [Vips::PCS] :pcs Set Profile Connection Space
1413
+ # @option opts [Vips::Intent] :intent Rendering intent
1414
+ # @option opts [Boolean] :embedded Use embedded input profile, if available
1415
+ # @option opts [String] :input_profile Filename to load input profile from
1416
+ # @return [Vips::Image] Output image
1417
+
1418
+ # @!method icc_export(, opts = {})
1419
+ # Output to device with icc profile.
1420
+ # @param [Hash] opts Set of options
1421
+ # @option opts [Vips::PCS] :pcs Set Profile Connection Space
1422
+ # @option opts [Vips::Intent] :intent Rendering intent
1423
+ # @option opts [String] :output_profile Filename to load output profile from
1424
+ # @option opts [Integer] :depth Output device space depth in bits
1425
+ # @return [Vips::Image] Output image
1426
+
1427
+ # @!method icc_transform(output_profile, opts = {})
1428
+ # Transform between devices with icc profiles.
1429
+ # @param output_profile [String] Filename to load output profile from
1430
+ # @param [Hash] opts Set of options
1431
+ # @option opts [Vips::PCS] :pcs Set Profile Connection Space
1432
+ # @option opts [Vips::Intent] :intent Rendering intent
1433
+ # @option opts [Boolean] :embedded Use embedded input profile, if available
1434
+ # @option opts [String] :input_profile Filename to load input profile from
1435
+ # @option opts [Integer] :depth Output device space depth in bits
1436
+ # @return [Vips::Image] Output image
1437
+
1438
+ # @!method dE76(right, opts = {})
1439
+ # Calculate de76.
1440
+ # @param right [Vips::Image] Right-hand input image
1441
+ # @param [Hash] opts Set of options
1442
+ # @return [Vips::Image] Output image
1443
+
1444
+ # @!method dE00(right, opts = {})
1445
+ # Calculate de00.
1446
+ # @param right [Vips::Image] Right-hand input image
1447
+ # @param [Hash] opts Set of options
1448
+ # @return [Vips::Image] Output image
1449
+
1450
+ # @!method dECMC(right, opts = {})
1451
+ # Calculate decmc.
1452
+ # @param right [Vips::Image] Right-hand input image
1453
+ # @param [Hash] opts Set of options
1454
+ # @return [Vips::Image] Output image
1455
+
1456
+ # @!method sRGB2scRGB(, opts = {})
1457
+ # Convert an srgb image to scrgb.
1458
+ # @param [Hash] opts Set of options
1459
+ # @return [Vips::Image] Output image
1460
+
1461
+ # @!method scRGB2BW(, opts = {})
1462
+ # Convert scrgb to bw.
1463
+ # @param [Hash] opts Set of options
1464
+ # @option opts [Integer] :depth Output device space depth in bits
1465
+ # @return [Vips::Image] Output image
1466
+
1467
+ # @!method scRGB2sRGB(, opts = {})
1468
+ # Convert an scrgb image to srgb.
1469
+ # @param [Hash] opts Set of options
1470
+ # @option opts [Integer] :depth Output device space depth in bits
1471
+ # @return [Vips::Image] Output image
1472
+
1473
+ # @!method maplut(lut, opts = {})
1474
+ # Map an image though a lut.
1475
+ # @param lut [Vips::Image] Look-up table image
1476
+ # @param [Hash] opts Set of options
1477
+ # @option opts [Integer] :band apply one-band lut to this band of in
1478
+ # @return [Vips::Image] Output image
1479
+
1480
+ # @!method percent(percent, opts = {})
1481
+ # Find threshold for percent of pixels.
1482
+ # @param percent [Float] Percent of pixels
1483
+ # @param [Hash] opts Set of options
1484
+ # @return [Integer] Threshold above which lie percent of pixels
1485
+
1486
+ # @!method stdif(width, height, opts = {})
1487
+ # Statistical difference.
1488
+ # @param width [Integer] Window width in pixels
1489
+ # @param height [Integer] Window height in pixels
1490
+ # @param [Hash] opts Set of options
1491
+ # @option opts [Float] :a Weight of new mean
1492
+ # @option opts [Float] :s0 New deviation
1493
+ # @option opts [Float] :b Weight of new deviation
1494
+ # @option opts [Float] :m0 New mean
1495
+ # @return [Vips::Image] Output image
1496
+
1497
+ # @!method hist_cum(, opts = {})
1498
+ # Form cumulative histogram.
1499
+ # @param [Hash] opts Set of options
1500
+ # @return [Vips::Image] Output image
1501
+
1502
+ # @!method hist_match(ref, opts = {})
1503
+ # Match two histograms.
1504
+ # @param ref [Vips::Image] Reference histogram
1505
+ # @param [Hash] opts Set of options
1506
+ # @return [Vips::Image] Output image
1507
+
1508
+ # @!method hist_norm(, opts = {})
1509
+ # Normalise histogram.
1510
+ # @param [Hash] opts Set of options
1511
+ # @return [Vips::Image] Output image
1512
+
1513
+ # @!method hist_equal(, opts = {})
1514
+ # Histogram equalisation.
1515
+ # @param [Hash] opts Set of options
1516
+ # @option opts [Integer] :band Equalise with this band
1517
+ # @return [Vips::Image] Output image
1518
+
1519
+ # @!method hist_plot(, opts = {})
1520
+ # Plot histogram.
1521
+ # @param [Hash] opts Set of options
1522
+ # @return [Vips::Image] Output image
1523
+
1524
+ # @!method hist_local(width, height, opts = {})
1525
+ # Local histogram equalisation.
1526
+ # @param width [Integer] Window width in pixels
1527
+ # @param height [Integer] Window height in pixels
1528
+ # @param [Hash] opts Set of options
1529
+ # @return [Vips::Image] Output image
1530
+
1531
+ # @!method hist_ismonotonic(, opts = {})
1532
+ # Test for monotonicity.
1533
+ # @param [Hash] opts Set of options
1534
+ # @return [Boolean] true if in is monotonic
1535
+
1536
+ # @!method hist_entropy(, opts = {})
1537
+ # Estimate image entropy.
1538
+ # @param [Hash] opts Set of options
1539
+ # @return [Float] Output value
1540
+
1541
+ # @!method conv(mask, opts = {})
1542
+ # Convolution operation.
1543
+ # @param mask [Vips::Image] Input matrix image
1544
+ # @param [Hash] opts Set of options
1545
+ # @option opts [Vips::Precision] :precision Convolve with this precision
1546
+ # @option opts [Integer] :layers Use this many layers in approximation
1547
+ # @option opts [Integer] :cluster Cluster lines closer than this in approximation
1548
+ # @return [Vips::Image] Output image
1549
+
1550
+ # @!method compass(mask, opts = {})
1551
+ # Convolve with rotating mask.
1552
+ # @param mask [Vips::Image] Input matrix image
1553
+ # @param [Hash] opts Set of options
1554
+ # @option opts [Integer] :times Rotate and convolve this many times
1555
+ # @option opts [Vips::Angle45] :angle Rotate mask by this much between convolutions
1556
+ # @option opts [Vips::Combine] :combine Combine convolution results like this
1557
+ # @option opts [Vips::Precision] :precision Convolve with this precision
1558
+ # @option opts [Integer] :layers Use this many layers in approximation
1559
+ # @option opts [Integer] :cluster Cluster lines closer than this in approximation
1560
+ # @return [Vips::Image] Output image
1561
+
1562
+ # @!method convsep(mask, opts = {})
1563
+ # Seperable convolution operation.
1564
+ # @param mask [Vips::Image] Input matrix image
1565
+ # @param [Hash] opts Set of options
1566
+ # @option opts [Vips::Precision] :precision Convolve with this precision
1567
+ # @option opts [Integer] :layers Use this many layers in approximation
1568
+ # @option opts [Integer] :cluster Cluster lines closer than this in approximation
1569
+ # @return [Vips::Image] Output image
1570
+
1571
+ # @!method fastcor(ref, opts = {})
1572
+ # Fast correlation.
1573
+ # @param ref [Vips::Image] Input reference image
1574
+ # @param [Hash] opts Set of options
1575
+ # @return [Vips::Image] Output image
1576
+
1577
+ # @!method spcor(ref, opts = {})
1578
+ # Spatial correlation.
1579
+ # @param ref [Vips::Image] Input reference image
1580
+ # @param [Hash] opts Set of options
1581
+ # @return [Vips::Image] Output image
1582
+
1583
+ # @!method sharpen(, opts = {})
1584
+ # Unsharp masking for print.
1585
+ # @param [Hash] opts Set of options
1586
+ # @option opts [Integer] :radius Mask radius
1587
+ # @option opts [Float] :x1 Flat/jaggy threshold
1588
+ # @option opts [Float] :y2 Maximum brightening
1589
+ # @option opts [Float] :y3 Maximum darkening
1590
+ # @option opts [Float] :m1 Slope for flat areas
1591
+ # @option opts [Float] :m2 Slope for jaggy areas
1592
+ # @return [Vips::Image] Output image
1593
+
1594
+ # @!method gaussblur(sigma, opts = {})
1595
+ # Gaussian blur.
1596
+ # @param sigma [Float] Sigma of Gaussian
1597
+ # @param [Hash] opts Set of options
1598
+ # @option opts [Float] :min_ampl Minimum amplitude of Gaussian
1599
+ # @option opts [Vips::Precision] :precision Convolve with this precision
1600
+ # @return [Vips::Image] Output image
1601
+
1602
+ # @!method fwfft(, opts = {})
1603
+ # Forward fft.
1604
+ # @param [Hash] opts Set of options
1605
+ # @return [Vips::Image] Output image
1606
+
1607
+ # @!method invfft(, opts = {})
1608
+ # Inverse fft.
1609
+ # @param [Hash] opts Set of options
1610
+ # @option opts [Boolean] :real Output only the real part of the transform
1611
+ # @return [Vips::Image] Output image
1612
+
1613
+ # @!method freqmult(mask, opts = {})
1614
+ # Frequency-domain filtering.
1615
+ # @param mask [Vips::Image] Input mask image
1616
+ # @param [Hash] opts Set of options
1617
+ # @return [Vips::Image] Output image
1618
+
1619
+ # @!method spectrum(, opts = {})
1620
+ # Make displayable power spectrum.
1621
+ # @param [Hash] opts Set of options
1622
+ # @return [Vips::Image] Output image
1623
+
1624
+ # @!method phasecor(in2, opts = {})
1625
+ # Calculate phase correlation.
1626
+ # @param in2 [Vips::Image] Second input image
1627
+ # @param [Hash] opts Set of options
1628
+ # @return [Vips::Image] Output image
1629
+
1630
+ # @!method morph(mask, morph, opts = {})
1631
+ # Morphology operation.
1632
+ # @param mask [Vips::Image] Input matrix image
1633
+ # @param morph [Vips::OperationMorphology] Morphological operation to perform
1634
+ # @param [Hash] opts Set of options
1635
+ # @return [Vips::Image] Output image
1636
+
1637
+ # @!method rank(width, height, index, opts = {})
1638
+ # Rank filter.
1639
+ # @param width [Integer] Window width in pixels
1640
+ # @param height [Integer] Window height in pixels
1641
+ # @param index [Integer] Select pixel at index
1642
+ # @param [Hash] opts Set of options
1643
+ # @return [Vips::Image] Output image
1644
+
1645
+ # @!method countlines(direction, opts = {})
1646
+ # Count lines in an image.
1647
+ # @param direction [Vips::Direction] Countlines left-right or up-down
1648
+ # @param [Hash] opts Set of options
1649
+ # @return [Float] Number of lines
1650
+
1651
+ # @!method labelregions(, opts = {})
1652
+ # Label regions in an image.
1653
+ # @param [Hash] opts Set of options
1654
+ # @option opts [Integer] :segments Output -- Number of discrete contigious regions
1655
+ # @return [Vips::Image, Hash<Symbol => Object>] Mask of region labels, Hash of optional output items
1656
+
1657
+ # @!method draw_rect(ink, left, top, width, height, opts = {})
1658
+ # Paint a rectangle on an image.
1659
+ # @param ink [Array<Double>] Colour for pixels
1660
+ # @param left [Integer] Rect to fill
1661
+ # @param top [Integer] Rect to fill
1662
+ # @param width [Integer] Rect to fill
1663
+ # @param height [Integer] Rect to fill
1664
+ # @param [Hash] opts Set of options
1665
+ # @option opts [Boolean] :fill Draw a solid object
1666
+ # @return [Vips::Image] Image to draw on
1667
+
1668
+ # @!method draw_mask(ink, mask, x, y, opts = {})
1669
+ # Draw a mask on an image.
1670
+ # @param ink [Array<Double>] Colour for pixels
1671
+ # @param mask [Vips::Image] Mask of pixels to draw
1672
+ # @param x [Integer] Draw mask here
1673
+ # @param y [Integer] Draw mask here
1674
+ # @param [Hash] opts Set of options
1675
+ # @return [Vips::Image] Image to draw on
1676
+
1677
+ # @!method draw_line(ink, x1, y1, x2, y2, opts = {})
1678
+ # Draw a line on an image.
1679
+ # @param ink [Array<Double>] Colour for pixels
1680
+ # @param x1 [Integer] Start of draw_line
1681
+ # @param y1 [Integer] Start of draw_line
1682
+ # @param x2 [Integer] End of draw_line
1683
+ # @param y2 [Integer] End of draw_line
1684
+ # @param [Hash] opts Set of options
1685
+ # @return [Vips::Image] Image to draw on
1686
+
1687
+ # @!method draw_circle(ink, cx, cy, radius, opts = {})
1688
+ # Draw a circle on an image.
1689
+ # @param ink [Array<Double>] Colour for pixels
1690
+ # @param cx [Integer] Centre of draw_circle
1691
+ # @param cy [Integer] Centre of draw_circle
1692
+ # @param radius [Integer] Radius in pixels
1693
+ # @param [Hash] opts Set of options
1694
+ # @option opts [Boolean] :fill Draw a solid object
1695
+ # @return [Vips::Image] Image to draw on
1696
+
1697
+ # @!method draw_flood(ink, x, y, opts = {})
1698
+ # Flood-fill an area.
1699
+ # @param ink [Array<Double>] Colour for pixels
1700
+ # @param x [Integer] DrawFlood start point
1701
+ # @param y [Integer] DrawFlood start point
1702
+ # @param [Hash] opts Set of options
1703
+ # @option opts [Vips::Image] :test Test pixels in this image
1704
+ # @option opts [Boolean] :equal DrawFlood while equal to edge
1705
+ # @option opts [Integer] :left Output -- Left edge of modified area
1706
+ # @option opts [Integer] :top Output -- top edge of modified area
1707
+ # @option opts [Integer] :width Output -- width of modified area
1708
+ # @option opts [Integer] :height Output -- height of modified area
1709
+ # @return [Vips::Image, Hash<Symbol => Object>] Image to draw on, Hash of optional output items
1710
+
1711
+ # @!method draw_image(sub, x, y, opts = {})
1712
+ # Paint an image into another image.
1713
+ # @param sub [Vips::Image] Sub-image to insert into main image
1714
+ # @param x [Integer] Draw image here
1715
+ # @param y [Integer] Draw image here
1716
+ # @param [Hash] opts Set of options
1717
+ # @option opts [Vips::CombineMode] :mode Combining mode
1718
+ # @return [Vips::Image] Image to draw on
1719
+
1720
+ # @!method draw_smudge(left, top, width, height, opts = {})
1721
+ # Blur a rectangle on an image.
1722
+ # @param left [Integer] Rect to fill
1723
+ # @param top [Integer] Rect to fill
1724
+ # @param width [Integer] Rect to fill
1725
+ # @param height [Integer] Rect to fill
1726
+ # @param [Hash] opts Set of options
1727
+ # @return [Vips::Image] Image to draw on
1728
+
1729
+ # @!method merge(sec, direction, dx, dy, opts = {})
1730
+ # Merge two images.
1731
+ # @param sec [Vips::Image] Secondary image
1732
+ # @param direction [Vips::Direction] Horizontal or vertcial merge
1733
+ # @param dx [Integer] Horizontal displacement from sec to ref
1734
+ # @param dy [Integer] Vertical displacement from sec to ref
1735
+ # @param [Hash] opts Set of options
1736
+ # @option opts [Integer] :mblend Maximum blend size
1737
+ # @return [Vips::Image] Output image
1738
+
1739
+ # @!method mosaic(sec, direction, xref, yref, xsec, ysec, opts = {})
1740
+ # Mosaic two images.
1741
+ # @param sec [Vips::Image] Secondary image
1742
+ # @param direction [Vips::Direction] Horizontal or vertcial mosaic
1743
+ # @param xref [Integer] Position of reference tie-point
1744
+ # @param yref [Integer] Position of reference tie-point
1745
+ # @param xsec [Integer] Position of secondary tie-point
1746
+ # @param ysec [Integer] Position of secondary tie-point
1747
+ # @param [Hash] opts Set of options
1748
+ # @option opts [Integer] :hwindow Half window size
1749
+ # @option opts [Integer] :harea Half area size
1750
+ # @option opts [Integer] :mblend Maximum blend size
1751
+ # @option opts [Integer] :bandno Band to search for features on
1752
+ # @option opts [Integer] :dx0 Output -- Detected integer offset
1753
+ # @option opts [Integer] :dy0 Output -- Detected integer offset
1754
+ # @option opts [Float] :scale1 Output -- Detected scale
1755
+ # @option opts [Float] :angle1 Output -- Detected rotation
1756
+ # @option opts [Float] :dx1 Output -- Detected first-order displacement
1757
+ # @option opts [Float] :dy1 Output -- Detected first-order displacement
1758
+ # @return [Vips::Image, Hash<Symbol => Object>] Output image, Hash of optional output items
1759
+
1760
+ # @!method mosaic1(sec, direction, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, opts = {})
1761
+ # First-order mosaic of two images.
1762
+ # @param sec [Vips::Image] Secondary image
1763
+ # @param direction [Vips::Direction] Horizontal or vertcial mosaic
1764
+ # @param xr1 [Integer] Position of first reference tie-point
1765
+ # @param yr1 [Integer] Position of first reference tie-point
1766
+ # @param xs1 [Integer] Position of first secondary tie-point
1767
+ # @param ys1 [Integer] Position of first secondary tie-point
1768
+ # @param xr2 [Integer] Position of second reference tie-point
1769
+ # @param yr2 [Integer] Position of second reference tie-point
1770
+ # @param xs2 [Integer] Position of second secondary tie-point
1771
+ # @param ys2 [Integer] Position of second secondary tie-point
1772
+ # @param [Hash] opts Set of options
1773
+ # @option opts [Integer] :hwindow Half window size
1774
+ # @option opts [Integer] :harea Half area size
1775
+ # @option opts [Boolean] :search Search to improve tie-points
1776
+ # @option opts [Vips::Interpolate] :interpolate Interpolate pixels with this
1777
+ # @option opts [Integer] :mblend Maximum blend size
1778
+ # @option opts [Integer] :bandno Band to search for features on
1779
+ # @return [Vips::Image] Output image
1780
+
1781
+ # @!method match(sec, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, opts = {})
1782
+ # First-order match of two images.
1783
+ # @param sec [Vips::Image] Secondary image
1784
+ # @param xr1 [Integer] Position of first reference tie-point
1785
+ # @param yr1 [Integer] Position of first reference tie-point
1786
+ # @param xs1 [Integer] Position of first secondary tie-point
1787
+ # @param ys1 [Integer] Position of first secondary tie-point
1788
+ # @param xr2 [Integer] Position of second reference tie-point
1789
+ # @param yr2 [Integer] Position of second reference tie-point
1790
+ # @param xs2 [Integer] Position of second secondary tie-point
1791
+ # @param ys2 [Integer] Position of second secondary tie-point
1792
+ # @param [Hash] opts Set of options
1793
+ # @option opts [Integer] :hwindow Half window size
1794
+ # @option opts [Integer] :harea Half area size
1795
+ # @option opts [Boolean] :search Search to improve tie-points
1796
+ # @option opts [Vips::Interpolate] :interpolate Interpolate pixels with this
1797
+ # @return [Vips::Image] Output image
1798
+
1799
+ # @!method globalbalance(, opts = {})
1800
+ # Global balance an image mosaic.
1801
+ # @param [Hash] opts Set of options
1802
+ # @option opts [Float] :gamma Image gamma
1803
+ # @option opts [Boolean] :int_output Integer output
1804
+ # @return [Vips::Image] Output image
1805
+
1806
+ end
1807
+ end