vips 8.11.3 → 8.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
- data/.github/workflows/development.yml +54 -0
- data/.standard.yml +17 -0
- data/.yardopts +0 -1
- data/CHANGELOG.md +323 -0
- data/Gemfile +3 -1
- data/README.md +29 -15
- data/Rakefile +23 -18
- data/TODO +43 -0
- data/example/annotate.rb +6 -6
- data/example/connection.rb +18 -9
- data/example/daltonize8.rb +6 -6
- data/example/draw_lines.rb +30 -0
- data/example/example1.rb +4 -4
- data/example/example2.rb +6 -6
- data/example/example3.rb +5 -5
- data/example/example4.rb +2 -2
- data/example/example5.rb +4 -4
- data/example/inheritance_with_refcount.rb +46 -39
- data/example/progress.rb +3 -3
- data/example/thumb.rb +6 -6
- data/example/trim8.rb +1 -1
- data/example/watermark.rb +2 -2
- data/example/wobble.rb +1 -1
- data/lib/vips/blend_mode.rb +29 -25
- data/lib/vips/connection.rb +4 -4
- data/lib/vips/gobject.rb +18 -11
- data/lib/vips/gvalue.rb +54 -54
- data/lib/vips/image.rb +362 -169
- data/lib/vips/interpolate.rb +3 -2
- data/lib/vips/methods.rb +2877 -2319
- data/lib/vips/mutableimage.rb +173 -0
- data/lib/vips/object.rb +81 -88
- data/lib/vips/operation.rb +175 -82
- data/lib/vips/region.rb +6 -6
- data/lib/vips/source.rb +11 -12
- data/lib/vips/sourcecustom.rb +7 -8
- data/lib/vips/target.rb +12 -13
- data/lib/vips/targetcustom.rb +9 -10
- data/lib/vips/version.rb +1 -1
- data/lib/vips.rb +129 -82
- data/vips.gemspec +3 -3
- metadata +26 -19
data/lib/vips/target.rb
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
# Author:: John Cupitt (mailto:jcupitt@gmail.com)
|
5
5
|
# License:: MIT
|
6
6
|
|
7
|
-
require
|
7
|
+
require "ffi"
|
8
8
|
|
9
9
|
module Vips
|
10
|
-
if Vips
|
10
|
+
if Vips.at_least_libvips?(8, 9)
|
11
11
|
attach_function :vips_target_new_to_descriptor, [:int], :pointer
|
12
12
|
attach_function :vips_target_new_to_file, [:string], :pointer
|
13
13
|
attach_function :vips_target_new_to_memory, [], :pointer
|
@@ -43,45 +43,44 @@ module Vips
|
|
43
43
|
#
|
44
44
|
# Pass targets to {Image#write_to_target} to write images to
|
45
45
|
# them.
|
46
|
-
#
|
46
|
+
#
|
47
47
|
# @param descriptor [Integer] the file descriptor
|
48
48
|
# @return [Target] the new Vips::Target
|
49
49
|
def self.new_to_descriptor(descriptor)
|
50
|
-
ptr = Vips
|
50
|
+
ptr = Vips.vips_target_new_to_descriptor descriptor
|
51
51
|
raise Vips::Error if ptr.null?
|
52
52
|
|
53
53
|
Vips::Target.new ptr
|
54
54
|
end
|
55
55
|
|
56
|
-
# Create a new target to a file name.
|
56
|
+
# Create a new target to a file name.
|
57
57
|
#
|
58
58
|
# Pass targets to {Image#write_to_target} to write images to
|
59
59
|
# them.
|
60
|
-
#
|
60
|
+
#
|
61
61
|
# @param filename [String] the name of the file
|
62
62
|
# @return [Target] the new Vips::Target
|
63
63
|
def self.new_to_file(filename)
|
64
|
-
raise Vips::Error,
|
65
|
-
ptr = Vips
|
64
|
+
raise Vips::Error, "filename is nil" if filename.nil?
|
65
|
+
ptr = Vips.vips_target_new_to_file filename
|
66
66
|
raise Vips::Error if ptr.null?
|
67
67
|
|
68
68
|
Vips::Target.new ptr
|
69
69
|
end
|
70
70
|
|
71
|
-
# Create a new target to an area of memory.
|
71
|
+
# Create a new target to an area of memory.
|
72
72
|
#
|
73
73
|
# Pass targets to {Image#write_to_target} to write images to
|
74
74
|
# them.
|
75
75
|
#
|
76
|
-
# Once the image has been written, use {Object#get}`("blob")` to read out
|
76
|
+
# Once the image has been written, use {Object#get}`("blob")` to read out
|
77
77
|
# the data.
|
78
|
-
#
|
78
|
+
#
|
79
79
|
# @return [Target] the new Vips::Target
|
80
80
|
def self.new_to_memory
|
81
|
-
ptr = Vips
|
81
|
+
ptr = Vips.vips_target_new_to_memory
|
82
82
|
|
83
83
|
Vips::Target.new ptr
|
84
84
|
end
|
85
|
-
|
86
85
|
end
|
87
86
|
end
|
data/lib/vips/targetcustom.rb
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# Author:: John Cupitt (mailto:jcupitt@gmail.com)
|
5
5
|
# License:: MIT
|
6
6
|
|
7
|
-
require
|
7
|
+
require "ffi"
|
8
8
|
|
9
9
|
module Vips
|
10
|
-
if Vips
|
10
|
+
if Vips.at_least_libvips?(8, 9)
|
11
11
|
attach_function :vips_target_custom_new, [], :pointer
|
12
12
|
end
|
13
13
|
|
14
|
-
# A target you can attach action signal handlers to to implememt
|
14
|
+
# A target you can attach action signal handlers to to implememt
|
15
15
|
# custom output types.
|
16
16
|
#
|
17
17
|
# For example:
|
@@ -23,7 +23,7 @@ module Vips
|
|
23
23
|
# image.write_to_target target, ".png"
|
24
24
|
# ```
|
25
25
|
#
|
26
|
-
# (just an example -- of course in practice you'd use {Target#new_to_file}
|
26
|
+
# (just an example -- of course in practice you'd use {Target#new_to_file}
|
27
27
|
# to write to a named file)
|
28
28
|
class TargetCustom < Vips::Target
|
29
29
|
module TargetCustomLayout
|
@@ -44,17 +44,17 @@ module Vips
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def initialize
|
47
|
-
pointer = Vips
|
47
|
+
pointer = Vips.vips_target_custom_new
|
48
48
|
raise Vips::Error if pointer.null?
|
49
49
|
|
50
50
|
super pointer
|
51
51
|
end
|
52
52
|
|
53
53
|
# The block is executed to write data to the source. The interface is
|
54
|
-
# exactly as IO::write, ie. it should write the string and return the
|
54
|
+
# exactly as IO::write, ie. it should write the string and return the
|
55
55
|
# number of bytes written.
|
56
56
|
#
|
57
|
-
# @yieldparam bytes [String] Write these bytes to the file
|
57
|
+
# @yieldparam bytes [String] Write these bytes to the file
|
58
58
|
# @yieldreturn [Integer] The number of bytes written, or -1 on error
|
59
59
|
def on_write &block
|
60
60
|
signal_connect "write" do |p, len|
|
@@ -69,10 +69,9 @@ module Vips
|
|
69
69
|
# The block is executed at the end of write. It should do any necessary
|
70
70
|
# finishing action, such as closing a file.
|
71
71
|
def on_finish &block
|
72
|
-
signal_connect "finish" do
|
73
|
-
block.call
|
72
|
+
signal_connect "finish" do
|
73
|
+
block.call
|
74
74
|
end
|
75
75
|
end
|
76
|
-
|
77
76
|
end
|
78
77
|
end
|
data/lib/vips/version.rb
CHANGED
data/lib/vips.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
# Author:: John Cupitt (mailto:jcupitt@gmail.com)
|
5
5
|
# License:: MIT
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
7
|
+
require "ffi"
|
8
|
+
require "logger"
|
9
9
|
|
10
10
|
# This module uses FFI to make a simple layer over the glib and gobject
|
11
11
|
# libraries.
|
@@ -37,12 +37,12 @@ module GLib
|
|
37
37
|
class << self
|
38
38
|
attr_accessor :logger
|
39
39
|
end
|
40
|
-
@logger = Logger.new(
|
40
|
+
@logger = Logger.new($stdout)
|
41
41
|
@logger.level = Logger::WARN
|
42
42
|
|
43
43
|
extend FFI::Library
|
44
44
|
|
45
|
-
ffi_lib library_name(
|
45
|
+
ffi_lib library_name("glib-2.0", 0)
|
46
46
|
|
47
47
|
attach_function :g_malloc, [:size_t], :pointer
|
48
48
|
|
@@ -52,20 +52,20 @@ module GLib
|
|
52
52
|
|
53
53
|
callback :g_log_func, [:string, :int, :string, :pointer], :void
|
54
54
|
attach_function :g_log_set_handler,
|
55
|
-
|
55
|
+
[:string, :int, :g_log_func, :pointer], :int
|
56
56
|
attach_function :g_log_remove_handler, [:string, :int], :void
|
57
57
|
|
58
58
|
# log flags
|
59
|
-
LOG_FLAG_RECURSION
|
60
|
-
LOG_FLAG_FATAL
|
59
|
+
LOG_FLAG_RECURSION = 1 << 0
|
60
|
+
LOG_FLAG_FATAL = 1 << 1
|
61
61
|
|
62
62
|
# GLib log levels
|
63
|
-
LOG_LEVEL_ERROR
|
64
|
-
LOG_LEVEL_CRITICAL
|
65
|
-
LOG_LEVEL_WARNING
|
66
|
-
LOG_LEVEL_MESSAGE
|
67
|
-
LOG_LEVEL_INFO
|
68
|
-
LOG_LEVEL_DEBUG
|
63
|
+
LOG_LEVEL_ERROR = 1 << 2 # always fatal
|
64
|
+
LOG_LEVEL_CRITICAL = 1 << 3
|
65
|
+
LOG_LEVEL_WARNING = 1 << 4
|
66
|
+
LOG_LEVEL_MESSAGE = 1 << 5
|
67
|
+
LOG_LEVEL_INFO = 1 << 6
|
68
|
+
LOG_LEVEL_DEBUG = 1 << 7
|
69
69
|
|
70
70
|
# map glib levels to Logger::Severity
|
71
71
|
GLIB_TO_SEVERITY = {
|
@@ -83,9 +83,9 @@ module GLib
|
|
83
83
|
@glib_log_handler_id = 0
|
84
84
|
|
85
85
|
# module-level, so it's not GCd away
|
86
|
-
LOG_HANDLER =
|
86
|
+
LOG_HANDLER = proc { |domain, level, message, _user_data|
|
87
87
|
@logger.log(GLIB_TO_SEVERITY[level], message, domain)
|
88
|
-
|
88
|
+
}
|
89
89
|
|
90
90
|
def self.remove_log_handler
|
91
91
|
if @glib_log_handler_id != 0 && @glib_log_domain
|
@@ -95,7 +95,7 @@ module GLib
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def self.set_log_domain domain
|
98
|
-
GLib
|
98
|
+
GLib.remove_log_handler
|
99
99
|
|
100
100
|
@glib_log_domain = domain
|
101
101
|
|
@@ -125,7 +125,7 @@ module GLib
|
|
125
125
|
# on shutdown and we don't want LOG_HANDLER to be invoked
|
126
126
|
# after Ruby has gone
|
127
127
|
at_exit {
|
128
|
-
GLib
|
128
|
+
GLib.remove_log_handler
|
129
129
|
}
|
130
130
|
end
|
131
131
|
end
|
@@ -134,7 +134,7 @@ end
|
|
134
134
|
module GObject
|
135
135
|
extend FFI::Library
|
136
136
|
|
137
|
-
ffi_lib library_name(
|
137
|
+
ffi_lib library_name("gobject-2.0", 0)
|
138
138
|
|
139
139
|
# we can't just use ulong, windows has different int sizing rules
|
140
140
|
if FFI::Platform::ADDRESS_SIZE == 64
|
@@ -162,8 +162,8 @@ module GObject
|
|
162
162
|
GOBJECT_TYPE = g_type_from_name "GObject"
|
163
163
|
end
|
164
164
|
|
165
|
-
require
|
166
|
-
require
|
165
|
+
require "vips/gobject"
|
166
|
+
require "vips/gvalue"
|
167
167
|
|
168
168
|
# This module provides a binding for the [libvips image processing
|
169
169
|
# library](https://libvips.github.io/libvips/).
|
@@ -208,12 +208,10 @@ require 'vips/gvalue'
|
|
208
208
|
# for full details
|
209
209
|
# on the various modes available.
|
210
210
|
#
|
211
|
-
# You can also load formatted images from
|
212
|
-
#
|
213
|
-
# from
|
214
|
-
#
|
215
|
-
# Use {Source} and {Image.new_from_source} to load images from any data
|
216
|
-
# source, for example URIs.
|
211
|
+
# You can also load formatted images from memory buffers, create images that
|
212
|
+
# wrap C-style memory arrays, or make images from constants. Use {Source}
|
213
|
+
# and {Image.new_from_source} to load images from any data source, for
|
214
|
+
# example URIs.
|
217
215
|
#
|
218
216
|
# The next line:
|
219
217
|
#
|
@@ -256,7 +254,7 @@ require 'vips/gvalue'
|
|
256
254
|
# suffix. You can also write formatted images to memory buffers, or dump
|
257
255
|
# image data to a raw memory array.
|
258
256
|
#
|
259
|
-
# Use {Target} and {Image#write_to_target} to write formatted images to
|
257
|
+
# Use {Target} and {Image#write_to_target} to write formatted images to
|
260
258
|
# any data sink, for example URIs.
|
261
259
|
#
|
262
260
|
# # How it works
|
@@ -409,36 +407,83 @@ require 'vips/gvalue'
|
|
409
407
|
#
|
410
408
|
# # Automatic YARD documentation
|
411
409
|
#
|
412
|
-
# The bulk of these API docs are generated automatically by
|
413
|
-
#
|
414
|
-
#
|
415
|
-
# that that operation expects.
|
410
|
+
# The bulk of these API docs are generated automatically by {Yard#generate}.
|
411
|
+
# It examines libvips and writes a summary of each operation and the arguments
|
412
|
+
# and options that that operation expects.
|
416
413
|
#
|
417
|
-
# Use the [C API
|
418
|
-
# docs](https://libvips.github.io/libvips/API/current)
|
414
|
+
# Use the [C API # docs](https://libvips.github.io/libvips/API/current)
|
419
415
|
# for more detail.
|
420
416
|
#
|
421
417
|
# # Enums
|
422
418
|
#
|
423
419
|
# The libvips enums, such as `VipsBandFormat` appear in ruby-vips as Symbols
|
424
420
|
# like `:uchar`. They are documented as a set of classes for convenience, see
|
425
|
-
#
|
421
|
+
# {Vips::BandFormat}, for example.
|
426
422
|
#
|
427
423
|
# # Draw operations
|
428
424
|
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
# makes them hard to use with the rest of libvips: you need to be very careful
|
432
|
-
# about the order in which operations execute or you can get nasty crashes.
|
425
|
+
# There are two ways of calling the libvips draw operations, like
|
426
|
+
# {Image#draw_circle} and {Image#draw_line}.
|
433
427
|
#
|
434
|
-
#
|
435
|
-
#
|
436
|
-
#
|
437
|
-
#
|
438
|
-
#
|
428
|
+
# First, you can use them like functions. For example:
|
429
|
+
#
|
430
|
+
# ```ruby
|
431
|
+
# y = x.draw_line 255, 0, 0, x.width, x.height
|
432
|
+
# ```
|
439
433
|
#
|
440
|
-
#
|
441
|
-
#
|
434
|
+
# This will make a new image, `y`, which is a copy of `x` but with a line
|
435
|
+
# drawn across it. `x` is unchanged.
|
436
|
+
#
|
437
|
+
# This is simple, but will be slow if you want to draw many lines, since
|
438
|
+
# ruby-vips will make a copy of the whole image each time.
|
439
|
+
#
|
440
|
+
# You can use {Image#mutate} to make a {MutableImage}. This is an image which
|
441
|
+
# is unshared and is only available inside the {Image#mutate} block. Within
|
442
|
+
# this block, you can use `!` versions of the draw operations to modify images
|
443
|
+
# and avoid the copy. For example:
|
444
|
+
#
|
445
|
+
# ```ruby
|
446
|
+
# image = image.mutate do |mutable|
|
447
|
+
# (0 ... 1).step(0.01) do |i|
|
448
|
+
# mutable.draw_line! 255, mutable.width * i, 0, 0, mutable.height * (1 - i)
|
449
|
+
# end
|
450
|
+
# end
|
451
|
+
# ```
|
452
|
+
#
|
453
|
+
# Now each {Image#draw_line} will directly modify the mutable image, saving
|
454
|
+
# the copy. This is much faster and needs much less memory.
|
455
|
+
#
|
456
|
+
# # Metadata read
|
457
|
+
#
|
458
|
+
# Use {Image#get_fields} to get a list of the metadata fields that an image
|
459
|
+
# supports. ICC profiles, for example, are in a field called
|
460
|
+
# `icc-profile-data`. Use `vipsheader -a something.jpg` at the command-line
|
461
|
+
# to see all the fields on an image.
|
462
|
+
#
|
463
|
+
# Use {Image#get_typeof} to get the type of a field. Types are integers, with
|
464
|
+
# 0 meaning "no such field". Constants like {GObject::GINT_TYPE} are useful for
|
465
|
+
# testing field types.
|
466
|
+
#
|
467
|
+
# You can read image metadata using {Image#get}. The field value is converted
|
468
|
+
# to a Ruby value in the obvious way.
|
469
|
+
#
|
470
|
+
# # Metadata write
|
471
|
+
#
|
472
|
+
# You can also set and remove image metadata fields. Images are immutable, so
|
473
|
+
# you must make any changes inside a {Image#mutate} block. For example:
|
474
|
+
#
|
475
|
+
# ```ruby
|
476
|
+
# image = image.mutate do |mutable|
|
477
|
+
# image.get_fields.each do |field|
|
478
|
+
# mutable.remove! field unless field == "icc-profile-data"
|
479
|
+
# end
|
480
|
+
# end
|
481
|
+
# ```
|
482
|
+
#
|
483
|
+
# To remove all metadata except the icc profile.
|
484
|
+
#
|
485
|
+
# You can use {MutableImage#set!} to change the value of an existing field,
|
486
|
+
# and {MutableImage#set_type!} to create a new field with a specified type.
|
442
487
|
#
|
443
488
|
# # Progress
|
444
489
|
#
|
@@ -448,7 +493,7 @@ require 'vips/gvalue'
|
|
448
493
|
# ```ruby
|
449
494
|
# image = Vips::Image.black 1, 100000
|
450
495
|
# image.set_progress true
|
451
|
-
#
|
496
|
+
#
|
452
497
|
# def progress_to_s(name, progress)
|
453
498
|
# puts "#{name}:"
|
454
499
|
# puts " run = #{progress[:run]}"
|
@@ -457,23 +502,23 @@ require 'vips/gvalue'
|
|
457
502
|
# puts " npels = #{progress[:npels]}"
|
458
503
|
# puts " percent = #{progress[:percent]}"
|
459
504
|
# end
|
460
|
-
#
|
505
|
+
#
|
461
506
|
# image.signal_connect :preeval do |progress|
|
462
507
|
# progress_to_s("preeval", progress)
|
463
508
|
# end
|
464
|
-
#
|
509
|
+
#
|
465
510
|
# image.signal_connect :eval do |progress|
|
466
511
|
# progress_to_s("eval", progress)
|
467
512
|
# image.set_kill(true) if progress[:percent] > 50
|
468
513
|
# end
|
469
|
-
#
|
514
|
+
#
|
470
515
|
# image.signal_connect :posteval do |progress|
|
471
516
|
# progress_to_s("posteval", progress)
|
472
517
|
# end
|
473
|
-
#
|
518
|
+
#
|
474
519
|
# image.avg
|
475
520
|
# ```
|
476
|
-
#
|
521
|
+
#
|
477
522
|
# The `:eval` signal will fire for every tile that is processed. You can stop
|
478
523
|
# progress with {Image#set_kill} and processing will end with an exception.
|
479
524
|
#
|
@@ -525,21 +570,22 @@ require 'vips/gvalue'
|
|
525
570
|
module Vips
|
526
571
|
extend FFI::Library
|
527
572
|
|
528
|
-
|
529
|
-
vips_libname = 'libvips-42.dll'
|
530
|
-
else
|
531
|
-
vips_libname = File.expand_path(FFI.map_library_name('vips'), __dir__)
|
532
|
-
end
|
533
|
-
|
534
|
-
ffi_lib vips_libname
|
573
|
+
ffi_lib library_name("vips", 42)
|
535
574
|
|
536
575
|
LOG_DOMAIN = "VIPS"
|
537
|
-
GLib
|
576
|
+
GLib.set_log_domain LOG_DOMAIN
|
538
577
|
|
539
|
-
|
578
|
+
# we can't just use ulong, windows has different int sizing rules
|
579
|
+
if FFI::Platform::ADDRESS_SIZE == 64
|
580
|
+
typedef :uint64, :GType
|
581
|
+
else
|
582
|
+
typedef :uint32, :GType
|
583
|
+
end
|
540
584
|
|
541
585
|
attach_function :vips_error_buffer, [], :string
|
542
586
|
attach_function :vips_error_clear, [], :void
|
587
|
+
attach_function :vips_error_freeze, [], :void
|
588
|
+
attach_function :vips_error_thaw, [], :void
|
543
589
|
|
544
590
|
# The ruby-vips error class.
|
545
591
|
class Error < RuntimeError
|
@@ -548,9 +594,9 @@ module Vips
|
|
548
594
|
def initialize msg = nil
|
549
595
|
if msg
|
550
596
|
@details = msg
|
551
|
-
elsif Vips
|
552
|
-
@details = Vips
|
553
|
-
Vips
|
597
|
+
elsif Vips.vips_error_buffer != ""
|
598
|
+
@details = Vips.vips_error_buffer
|
599
|
+
Vips.vips_error_clear
|
554
600
|
else
|
555
601
|
@details = nil
|
556
602
|
end
|
@@ -560,7 +606,7 @@ module Vips
|
|
560
606
|
#
|
561
607
|
# @return [String] The error message
|
562
608
|
def to_s
|
563
|
-
if
|
609
|
+
if !@details.nil?
|
564
610
|
@details
|
565
611
|
else
|
566
612
|
super.to_s
|
@@ -570,8 +616,8 @@ module Vips
|
|
570
616
|
|
571
617
|
attach_function :vips_init, [:string], :int
|
572
618
|
|
573
|
-
if Vips
|
574
|
-
throw Vips
|
619
|
+
if Vips.vips_init($0) != 0
|
620
|
+
throw Vips.get_error
|
575
621
|
end
|
576
622
|
|
577
623
|
# don't use at_exit to call vips_shutdown, it causes problems with fork, and
|
@@ -635,7 +681,7 @@ module Vips
|
|
635
681
|
# Don't use this, instead change GLib::logger.level.
|
636
682
|
def self.set_debug debug
|
637
683
|
if debug
|
638
|
-
GLib
|
684
|
+
GLib.logger.level = Logger::DEBUG
|
639
685
|
end
|
640
686
|
end
|
641
687
|
|
@@ -657,36 +703,37 @@ module Vips
|
|
657
703
|
# vips_foreign_get_suffixes() was added in libvips 8.8
|
658
704
|
return [] unless Vips.respond_to? :vips_foreign_get_suffixes
|
659
705
|
|
660
|
-
array = Vips
|
706
|
+
array = Vips.vips_foreign_get_suffixes
|
661
707
|
|
662
708
|
names = []
|
663
709
|
p = array
|
664
710
|
until (q = p.read_pointer).null?
|
665
711
|
suff = q.read_string
|
666
|
-
GLib
|
712
|
+
GLib.g_free q
|
667
713
|
names << suff unless names.include? suff
|
668
714
|
p += FFI::Type::POINTER.size
|
669
715
|
end
|
670
|
-
GLib
|
716
|
+
GLib.g_free array
|
671
717
|
|
672
718
|
names
|
673
719
|
end
|
674
720
|
|
675
|
-
LIBRARY_VERSION = Vips
|
721
|
+
LIBRARY_VERSION = Vips.version_string
|
676
722
|
|
677
723
|
# libvips has this arbitrary number as a sanity-check upper bound on image
|
678
724
|
# size. It's sometimes useful to know when calculating scale factors.
|
679
725
|
MAX_COORD = 10000000
|
680
726
|
end
|
681
727
|
|
682
|
-
require
|
683
|
-
require
|
684
|
-
require
|
685
|
-
require
|
686
|
-
require
|
687
|
-
require
|
688
|
-
require
|
689
|
-
require
|
690
|
-
require
|
691
|
-
require
|
692
|
-
require
|
728
|
+
require "vips/object"
|
729
|
+
require "vips/operation"
|
730
|
+
require "vips/image"
|
731
|
+
require "vips/mutableimage"
|
732
|
+
require "vips/interpolate"
|
733
|
+
require "vips/region"
|
734
|
+
require "vips/version"
|
735
|
+
require "vips/connection"
|
736
|
+
require "vips/source"
|
737
|
+
require "vips/sourcecustom"
|
738
|
+
require "vips/target"
|
739
|
+
require "vips/targetcustom"
|
data/vips.gemspec
CHANGED
@@ -22,9 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.extensions = %w[ext/Rakefile]
|
24
24
|
|
25
|
-
spec.add_runtime_dependency "ffi", ["~> 1.
|
26
|
-
|
27
|
-
spec.add_development_dependency "pry"
|
25
|
+
spec.add_runtime_dependency "ffi", ["~> 1.12"]
|
28
26
|
|
29
27
|
spec.add_development_dependency "yard", "~> 0.8"
|
30
28
|
spec.add_development_dependency "redcarpet", "~> 3.3"
|
@@ -33,4 +31,6 @@ Gem::Specification.new do |spec|
|
|
33
31
|
spec.add_development_dependency "bundler"
|
34
32
|
spec.add_development_dependency "rspec", "~> 3.7"
|
35
33
|
spec.add_development_dependency "rake"
|
34
|
+
|
35
|
+
spec.add_development_dependency "standardrb"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Cupitt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -17,28 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '1.
|
20
|
+
version: '1.12'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '1.
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: pry
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
27
|
+
version: '1.12'
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: yard
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,6 +109,20 @@ dependencies:
|
|
123
109
|
- - ">="
|
124
110
|
- !ruby/object:Gem::Version
|
125
111
|
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: standardrb
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
126
|
description: Provides pre-compiled binaries for libvips.
|
127
127
|
email:
|
128
128
|
- jcupitt@gmail.com
|
@@ -132,15 +132,21 @@ extensions:
|
|
132
132
|
- ext/Rakefile
|
133
133
|
extra_rdoc_files: []
|
134
134
|
files:
|
135
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
136
|
+
- ".github/workflows/development.yml"
|
135
137
|
- ".gitignore"
|
138
|
+
- ".standard.yml"
|
136
139
|
- ".travis.yml"
|
137
140
|
- ".yardopts"
|
141
|
+
- CHANGELOG.md
|
138
142
|
- Gemfile
|
139
143
|
- README.md
|
140
144
|
- Rakefile
|
145
|
+
- TODO
|
141
146
|
- example/annotate.rb
|
142
147
|
- example/connection.rb
|
143
148
|
- example/daltonize8.rb
|
149
|
+
- example/draw_lines.rb
|
144
150
|
- example/example1.rb
|
145
151
|
- example/example2.rb
|
146
152
|
- example/example3.rb
|
@@ -173,6 +179,7 @@ files:
|
|
173
179
|
- lib/vips/interpretation.rb
|
174
180
|
- lib/vips/kernel.rb
|
175
181
|
- lib/vips/methods.rb
|
182
|
+
- lib/vips/mutableimage.rb
|
176
183
|
- lib/vips/object.rb
|
177
184
|
- lib/vips/operation.rb
|
178
185
|
- lib/vips/operationboolean.rb
|
@@ -210,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
217
|
- !ruby/object:Gem::Version
|
211
218
|
version: '0'
|
212
219
|
requirements: []
|
213
|
-
rubygems_version: 3.
|
220
|
+
rubygems_version: 3.2.32
|
214
221
|
signing_key:
|
215
222
|
specification_version: 4
|
216
223
|
summary: Vips is a high-performance image manipulation library.
|