rmagick 5.5.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
- data/.devcontainer/devcontainer.json +1 -1
- data/.github/workflows/ci.yml +27 -32
- data/.rubocop.yml +39 -9
- data/.rubocop_todo.yml +333 -194
- data/CHANGELOG.md +41 -0
- data/Gemfile +9 -15
- data/README.md +6 -6
- data/Rakefile +27 -12
- data/before_install_linux.sh +1 -11
- data/before_install_osx.sh +9 -7
- data/ext/RMagick/extconf.rb +38 -64
- data/ext/RMagick/rmagick.h +6 -13
- data/ext/RMagick/rmdraw.cpp +0 -10
- data/ext/RMagick/rmimage.cpp +21 -50
- data/ext/RMagick/rmmain.cpp +12 -27
- data/ext/RMagick/rmpixel.cpp +2 -2
- data/ext/RMagick/rmutil.cpp +27 -18
- data/lib/rmagick/version.rb +3 -3
- data/lib/rmagick.rb +1 -1
- data/lib/rmagick_internal.rb +49 -46
- data/lib/rvg/container.rb +3 -3
- data/lib/rvg/embellishable.rb +1 -1
- data/lib/rvg/misc.rb +9 -9
- data/lib/rvg/rvg.rb +4 -6
- data/lib/rvg/stylable.rb +2 -2
- data/lib/rvg/units.rb +1 -0
- data/rmagick.gemspec +5 -2
- data/sig/rmagick/_image_common_methods.rbs +0 -2
- data/sig/rmagick/enum.rbs +6 -0
- data/sig/rmagick/image.rbs +2 -0
- data/sig/rmagick/image_list.rbs +2 -0
- metadata +18 -15
data/lib/rmagick_internal.rb
CHANGED
@@ -10,13 +10,10 @@
|
|
10
10
|
# to the classes.
|
11
11
|
#==============================================================================
|
12
12
|
|
13
|
-
if RUBY_PLATFORM
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
RubyInstaller::Runtime.add_dll_directory(path) if File.exist?(File.join(path, 'CORE_RL_magick_.dll')) || File.exist?(File.join(path, 'CORE_RL_MagickCore_.dll'))
|
18
|
-
end
|
19
|
-
rescue LoadError
|
13
|
+
if RUBY_PLATFORM.match?(/mingw/i)
|
14
|
+
require 'ruby_installer'
|
15
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).grep(/ImageMagick/i).each do |path|
|
16
|
+
RubyInstaller::Runtime.add_dll_directory(path) if File.exist?(File.join(path, 'CORE_RL_magick_.dll')) || File.exist?(File.join(path, 'CORE_RL_MagickCore_.dll'))
|
20
17
|
end
|
21
18
|
end
|
22
19
|
|
@@ -51,11 +48,11 @@ module Magick
|
|
51
48
|
# p Magick.formats
|
52
49
|
# => {"3FR"=>" r-+", "3G2"=>" r-+", "3GP"=>" r-+", "A"=>"*rw+",
|
53
50
|
# ...
|
54
|
-
def formats
|
51
|
+
def formats(&block)
|
55
52
|
formats = init_formats
|
56
53
|
|
57
|
-
if
|
58
|
-
formats.each
|
54
|
+
if block
|
55
|
+
formats.each(&block)
|
59
56
|
self
|
60
57
|
else
|
61
58
|
formats
|
@@ -140,7 +137,7 @@ module Magick
|
|
140
137
|
|
141
138
|
# Convert object to a geometry string
|
142
139
|
def to_s
|
143
|
-
str =
|
140
|
+
str = +''
|
144
141
|
if @width > 0
|
145
142
|
fmt = @width.truncate == @width ? '%d' : '%.2f'
|
146
143
|
str << sprintf(fmt, @width)
|
@@ -227,7 +224,7 @@ module Magick
|
|
227
224
|
|
228
225
|
def enquote(str)
|
229
226
|
str = to_string(str)
|
230
|
-
if str.length > 2 && /\A(
|
227
|
+
if str.length > 2 && /\A(?:"[^\"]+"|'[^\']+'|\{[^\}]+\})\z/.match(str)
|
231
228
|
str
|
232
229
|
else
|
233
230
|
'"' + str + '"'
|
@@ -277,7 +274,7 @@ module Magick
|
|
277
274
|
|
278
275
|
# Draw a bezier curve.
|
279
276
|
def bezier(*points)
|
280
|
-
if points.
|
277
|
+
if points.empty?
|
281
278
|
Kernel.raise ArgumentError, 'no points specified'
|
282
279
|
elsif points.length.odd?
|
283
280
|
Kernel.raise ArgumentError, 'odd number of arguments specified'
|
@@ -479,7 +476,7 @@ module Magick
|
|
479
476
|
|
480
477
|
# Draw a polygon
|
481
478
|
def polygon(*points)
|
482
|
-
if points.
|
479
|
+
if points.empty?
|
483
480
|
Kernel.raise ArgumentError, 'no points specified'
|
484
481
|
elsif points.length.odd?
|
485
482
|
Kernel.raise ArgumentError, 'odd number of points specified'
|
@@ -489,7 +486,7 @@ module Magick
|
|
489
486
|
|
490
487
|
# Draw a polyline
|
491
488
|
def polyline(*points)
|
492
|
-
if points.
|
489
|
+
if points.empty?
|
493
490
|
Kernel.raise ArgumentError, 'no points specified'
|
494
491
|
elsif points.length.odd?
|
495
492
|
Kernel.raise ArgumentError, 'odd number of points specified'
|
@@ -504,7 +501,7 @@ module Magick
|
|
504
501
|
# pop('pattern')
|
505
502
|
|
506
503
|
def pop(*what)
|
507
|
-
if what.
|
504
|
+
if what.empty?
|
508
505
|
primitive 'pop graphic-context'
|
509
506
|
else
|
510
507
|
primitive 'pop ' + what.map { |x| to_string(x) }.join(' ')
|
@@ -517,7 +514,7 @@ module Magick
|
|
517
514
|
# push('gradient')
|
518
515
|
# push('pattern')
|
519
516
|
def push(*what)
|
520
|
-
if what.
|
517
|
+
if what.empty?
|
521
518
|
primitive 'push graphic-context'
|
522
519
|
else
|
523
520
|
primitive 'push ' + what.map { |x| to_string(x) }.join(' ')
|
@@ -573,7 +570,7 @@ module Magick
|
|
573
570
|
|
574
571
|
# Specify a stroke dash pattern
|
575
572
|
def stroke_dasharray(*list)
|
576
|
-
if list.
|
573
|
+
if list.empty?
|
577
574
|
primitive 'stroke-dasharray none'
|
578
575
|
else
|
579
576
|
list.map! { |x| Float(x) }.each do |x|
|
@@ -622,7 +619,7 @@ module Magick
|
|
622
619
|
def text(x, y, text)
|
623
620
|
text = to_string(text)
|
624
621
|
Kernel.raise ArgumentError, 'missing text argument' if text.empty?
|
625
|
-
if text.length > 2 && /\A(
|
622
|
+
if text.length > 2 && /\A(?:"[^\"]+"|'[^\']+'|\{[^\}]+\})\z/.match(text)
|
626
623
|
# text already quoted
|
627
624
|
elsif !text['\'']
|
628
625
|
text = '\'' + text + '\''
|
@@ -669,6 +666,7 @@ module Magick
|
|
669
666
|
|
670
667
|
# Define IPTC record number:dataset tags for use with Image#get_iptc_dataset
|
671
668
|
module IPTC
|
669
|
+
# rubocop:disable Naming/ConstantName
|
672
670
|
module Envelope
|
673
671
|
Model_Version = '1:00'
|
674
672
|
Destination = '1:05'
|
@@ -766,6 +764,7 @@ module Magick
|
|
766
764
|
module Post_ObjectData_Descriptor
|
767
765
|
Confirmed_ObjectData_Size = '9:10'
|
768
766
|
end
|
767
|
+
# rubocop:enable Naming/ConstantName
|
769
768
|
end # module Magick::IPTC
|
770
769
|
|
771
770
|
# Ruby-level Magick::Image methods
|
@@ -837,9 +836,9 @@ module Magick
|
|
837
836
|
# arrays.
|
838
837
|
def get_exif_by_entry(*entry)
|
839
838
|
ary = []
|
840
|
-
if entry.
|
839
|
+
if entry.empty?
|
841
840
|
exif_data = self['EXIF:*']
|
842
|
-
exif_data
|
841
|
+
exif_data&.split("\n")&.each { |exif| ary.push(exif.split('=')) }
|
843
842
|
else
|
844
843
|
get_exif_by_entry # ensure properties is populated with exif data
|
845
844
|
entry.each do |name|
|
@@ -853,14 +852,12 @@ module Magick
|
|
853
852
|
# Retrieve EXIF data by tag number or all tag/value pairs. The return value is a hash.
|
854
853
|
def get_exif_by_number(*tag)
|
855
854
|
hash = {}
|
856
|
-
if tag.
|
855
|
+
if tag.empty?
|
857
856
|
exif_data = self['EXIF:!']
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
hash[tag] = value
|
863
|
-
end
|
857
|
+
exif_data&.split("\n")&.each do |exif|
|
858
|
+
tag, value = exif.split('=')
|
859
|
+
tag = tag[1, 4].hex
|
860
|
+
hash[tag] = value
|
864
861
|
end
|
865
862
|
else
|
866
863
|
get_exif_by_number # ensure properties is populated with exif data
|
@@ -1288,10 +1285,10 @@ module Magick
|
|
1288
1285
|
# Allow scene to be set to nil
|
1289
1286
|
def scene=(n)
|
1290
1287
|
if n.nil?
|
1291
|
-
Kernel.raise IndexError, 'scene number out of bounds' unless @images.
|
1288
|
+
Kernel.raise IndexError, 'scene number out of bounds' unless @images.empty?
|
1292
1289
|
@scene = nil
|
1293
1290
|
return
|
1294
|
-
elsif @images.
|
1291
|
+
elsif @images.empty?
|
1295
1292
|
Kernel.raise IndexError, 'scene number out of bounds'
|
1296
1293
|
end
|
1297
1294
|
|
@@ -1368,7 +1365,7 @@ module Magick
|
|
1368
1365
|
|
1369
1366
|
def []=(*args)
|
1370
1367
|
obj = @images.[]=(*args)
|
1371
|
-
if obj
|
1368
|
+
if obj.respond_to?(:each)
|
1372
1369
|
assert_image_array(obj)
|
1373
1370
|
set_current obj.last.__id__
|
1374
1371
|
elsif obj
|
@@ -1522,7 +1519,7 @@ module Magick
|
|
1522
1519
|
end
|
1523
1520
|
|
1524
1521
|
def fill(*args, &block)
|
1525
|
-
assert_image args[0] unless
|
1522
|
+
assert_image args[0] unless block
|
1526
1523
|
current = get_current
|
1527
1524
|
@images.fill(*args, &block)
|
1528
1525
|
assert_image_array self
|
@@ -1542,7 +1539,7 @@ module Magick
|
|
1542
1539
|
alias select find_all
|
1543
1540
|
|
1544
1541
|
def from_blob(*blobs, &block)
|
1545
|
-
Kernel.raise ArgumentError, 'no blobs given' if blobs.
|
1542
|
+
Kernel.raise ArgumentError, 'no blobs given' if blobs.empty?
|
1546
1543
|
blobs.each do |b|
|
1547
1544
|
Magick::Image.from_blob(b, &block).each { |n| @images << n }
|
1548
1545
|
end
|
@@ -1571,9 +1568,8 @@ module Magick
|
|
1571
1568
|
|
1572
1569
|
# Call inspect for all the images
|
1573
1570
|
def inspect
|
1574
|
-
img =
|
1575
|
-
|
1576
|
-
img = '[' + img.join(",\n") + "]\nscene=#{@scene}"
|
1571
|
+
img = @images.map(&:inspect)
|
1572
|
+
'[' + img.join(",\n") + "]\nscene=#{@scene}"
|
1577
1573
|
end
|
1578
1574
|
|
1579
1575
|
# Set the number of iterations of an animated GIF
|
@@ -1584,7 +1580,7 @@ module Magick
|
|
1584
1580
|
end
|
1585
1581
|
|
1586
1582
|
def last(*args)
|
1587
|
-
if args.
|
1583
|
+
if args.empty?
|
1588
1584
|
a = @images.last
|
1589
1585
|
else
|
1590
1586
|
a = @images.last(*args)
|
@@ -1616,8 +1612,8 @@ module Magick
|
|
1616
1612
|
def method_missing(meth_id, *args, &block)
|
1617
1613
|
if @scene
|
1618
1614
|
img = @images[@scene]
|
1619
|
-
new_img = img.
|
1620
|
-
img.
|
1615
|
+
new_img = img.public_send(meth_id, *args, &block)
|
1616
|
+
img.equal?(new_img) ? self : new_img
|
1621
1617
|
else
|
1622
1618
|
super
|
1623
1619
|
end
|
@@ -1646,7 +1642,7 @@ module Magick
|
|
1646
1642
|
|
1647
1643
|
# Ping files and concatenate the new images
|
1648
1644
|
def ping(*files, &block)
|
1649
|
-
Kernel.raise ArgumentError, 'no files given' if files.
|
1645
|
+
Kernel.raise ArgumentError, 'no files given' if files.empty?
|
1650
1646
|
files.each do |f|
|
1651
1647
|
Magick::Image.ping(f, &block).each { |n| @images << n }
|
1652
1648
|
end
|
@@ -1672,7 +1668,7 @@ module Magick
|
|
1672
1668
|
|
1673
1669
|
# Read files and concatenate the new images
|
1674
1670
|
def read(*files, &block)
|
1675
|
-
Kernel.raise ArgumentError, 'no files given' if files.
|
1671
|
+
Kernel.raise ArgumentError, 'no files given' if files.empty?
|
1676
1672
|
files.each do |f|
|
1677
1673
|
Magick::Image.read(f, &block).each { |n| @images << n }
|
1678
1674
|
end
|
@@ -1735,8 +1731,8 @@ module Magick
|
|
1735
1731
|
self
|
1736
1732
|
end
|
1737
1733
|
|
1738
|
-
def reverse_each
|
1739
|
-
@images.reverse_each
|
1734
|
+
def reverse_each(&block)
|
1735
|
+
@images.reverse_each(&block)
|
1740
1736
|
self
|
1741
1737
|
end
|
1742
1738
|
|
@@ -1775,9 +1771,7 @@ module Magick
|
|
1775
1771
|
end
|
1776
1772
|
|
1777
1773
|
def to_a
|
1778
|
-
|
1779
|
-
@images.each { |image| a << image }
|
1780
|
-
a
|
1774
|
+
@images.map { |image| image }
|
1781
1775
|
end
|
1782
1776
|
|
1783
1777
|
def uniq
|
@@ -1811,6 +1805,15 @@ module Magick
|
|
1811
1805
|
end
|
1812
1806
|
alias indexes values_at
|
1813
1807
|
alias indices values_at
|
1808
|
+
|
1809
|
+
def destroy!
|
1810
|
+
@images.each(&:destroy!)
|
1811
|
+
self
|
1812
|
+
end
|
1813
|
+
|
1814
|
+
def destroyed?
|
1815
|
+
@images.all?(&:destroyed?)
|
1816
|
+
end
|
1814
1817
|
end # Magick::ImageList
|
1815
1818
|
|
1816
1819
|
class Pixel
|
data/lib/rvg/container.rb
CHANGED
@@ -108,11 +108,11 @@ module Magick
|
|
108
108
|
# If the element is not a group, defs, symbol, or rvg,
|
109
109
|
# wrap a group around it so it can get a transform and
|
110
110
|
# possibly a new viewport.
|
111
|
-
if
|
111
|
+
if element.respond_to?(:ref)
|
112
|
+
@element = element.deep_copy
|
113
|
+
else
|
112
114
|
@element = Group.new
|
113
115
|
@element << element.deep_copy
|
114
|
-
else
|
115
|
-
@element = element.deep_copy
|
116
116
|
end
|
117
117
|
@element.ref(x, y, width, height)
|
118
118
|
end
|
data/lib/rvg/embellishable.rb
CHANGED
@@ -109,7 +109,7 @@ module Magick
|
|
109
109
|
short = n > 0 ? y_coords : x_coords
|
110
110
|
olen = short.length
|
111
111
|
n.abs.times { |x| short << short[x % olen] }
|
112
|
-
points = x_coords.zip(y_coords).flatten
|
112
|
+
points = x_coords.zip(y_coords).flatten!
|
113
113
|
end
|
114
114
|
n = points.length
|
115
115
|
raise ArgumentError, "insufficient/odd number of points specified: #{n}" if n < 4 || n.odd?
|
data/lib/rvg/misc.rb
CHANGED
@@ -72,7 +72,7 @@ module Magick
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def enquote(text)
|
75
|
-
return text if text.length > 2 && /\A(
|
75
|
+
return text if text.length > 2 && /\A(?:"[^\"]+"|'[^\']+'|\{[^\}]+\})\z/.match(text)
|
76
76
|
|
77
77
|
if !text['\'']
|
78
78
|
text = '\'' + text + '\''
|
@@ -87,7 +87,7 @@ module Magick
|
|
87
87
|
|
88
88
|
# escape existing braces, surround with braces
|
89
89
|
text.gsub!(/[}]/) { |b| '\\' + b }
|
90
|
-
'{' +
|
90
|
+
'{' + text + '}'
|
91
91
|
end
|
92
92
|
|
93
93
|
def glyph_metrics(glyph_orientation, glyph)
|
@@ -114,7 +114,7 @@ module Magick
|
|
114
114
|
y_rel_coords << wy
|
115
115
|
end
|
116
116
|
first_word = false
|
117
|
-
word.
|
117
|
+
word.chars.each do |glyph|
|
118
118
|
wx, wy = get_letter_spacing(glyph)
|
119
119
|
x_rel_coords << wx
|
120
120
|
y_rel_coords << wy
|
@@ -173,7 +173,7 @@ module Magick
|
|
173
173
|
|
174
174
|
def render(x, y, text)
|
175
175
|
x_rel_coords, y_rel_coords = text_rel_coords(text)
|
176
|
-
dx = x_rel_coords.
|
176
|
+
dx = x_rel_coords.sum
|
177
177
|
dy = y_rel_coords.max
|
178
178
|
|
179
179
|
# We're handling the anchoring.
|
@@ -203,7 +203,7 @@ module Magick
|
|
203
203
|
text.split(::Magick::RVG::WORD_SEP).each do |word|
|
204
204
|
x += x_rel_coords.shift unless first_word
|
205
205
|
first_word = false
|
206
|
-
word.
|
206
|
+
word.chars.each do |glyph|
|
207
207
|
render_glyph(@ctx.text_attrs.glyph_orientation_horizontal, x, y, glyph)
|
208
208
|
x += x_rel_coords.shift
|
209
209
|
end
|
@@ -234,7 +234,7 @@ module Magick
|
|
234
234
|
def render(x, y, text)
|
235
235
|
x_rel_coords, y_rel_coords = text_rel_coords(text)
|
236
236
|
dx = x_rel_coords.max
|
237
|
-
dy = y_rel_coords.
|
237
|
+
dy = y_rel_coords.sum
|
238
238
|
|
239
239
|
# We're handling the anchoring.
|
240
240
|
@ctx.gc.push
|
@@ -271,7 +271,7 @@ module Magick
|
|
271
271
|
x_rel_coords.shift
|
272
272
|
end
|
273
273
|
first_word = false
|
274
|
-
word.
|
274
|
+
word.chars.each do |glyph|
|
275
275
|
case @ctx.text_attrs.glyph_orientation_vertical.to_i
|
276
276
|
when 0, 90, 270
|
277
277
|
x_shift = (dx - x_rel_coords.shift) / 2
|
@@ -579,7 +579,7 @@ module Magick
|
|
579
579
|
|
580
580
|
def font_weight(weight)
|
581
581
|
# If the arg is not in the hash use it directly. Handles numeric values.
|
582
|
-
weight =
|
582
|
+
weight = FONT_WEIGHT.fetch(weight.to_sym, Magick::NormalWeight) unless weight.is_a?(Numeric)
|
583
583
|
@gc.font_weight(weight)
|
584
584
|
@shadow[-1].font_weight = weight
|
585
585
|
nil
|
@@ -668,7 +668,7 @@ module Magick
|
|
668
668
|
end
|
669
669
|
|
670
670
|
def text(x, y, text)
|
671
|
-
return if text.
|
671
|
+
return if text.empty?
|
672
672
|
|
673
673
|
text_renderer = if @text_attrs.non_default?
|
674
674
|
TEXT_STRATEGIES[@text_attrs.writing_mode].new(self)
|
data/lib/rvg/rvg.rb
CHANGED
@@ -41,8 +41,6 @@ require 'rvg/clippath'
|
|
41
41
|
require 'rvg/paint'
|
42
42
|
require 'rvg/units'
|
43
43
|
|
44
|
-
require 'pp' if ENV['debug_rvg']
|
45
|
-
|
46
44
|
# RVG is the main class in this library. All graphic elements
|
47
45
|
# must be contained within an RVG object.
|
48
46
|
module Magick
|
@@ -108,7 +106,7 @@ module Magick
|
|
108
106
|
|
109
107
|
if ENV['debug_prim']
|
110
108
|
def print_gc(gc)
|
111
|
-
primitives = gc.inspect.split(
|
109
|
+
primitives = gc.inspect.split("\n")
|
112
110
|
indent = 0
|
113
111
|
primitives.each do |cmd|
|
114
112
|
indent -= 1 if cmd['pop ']
|
@@ -172,7 +170,9 @@ module Magick
|
|
172
170
|
# The default fill is "none", that is, transparent black.
|
173
171
|
def background_fill=(color)
|
174
172
|
warn 'background_fill= has no effect in nested RVG objects' if @nested
|
175
|
-
if
|
173
|
+
if color.is_a?(Magick::Pixel)
|
174
|
+
@background_fill = color
|
175
|
+
else
|
176
176
|
begin
|
177
177
|
@background_fill = Magick::Pixel.from_color(color)
|
178
178
|
rescue Magick::ImageMagickError
|
@@ -182,8 +182,6 @@ module Magick
|
|
182
182
|
rescue StandardError
|
183
183
|
raise ArgumentError, "argument must be a color name or a Pixel (got #{color.class})"
|
184
184
|
end
|
185
|
-
else
|
186
|
-
@background_fill = color
|
187
185
|
end
|
188
186
|
end
|
189
187
|
|
data/lib/rvg/stylable.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#++
|
5
5
|
module Magick
|
6
6
|
class RVG
|
7
|
-
|
7
|
+
# :stopdoc:
|
8
8
|
STYLES = %i[
|
9
9
|
clip_path clip_rule fill fill_opacity fill_rule font
|
10
10
|
font_family font_size font_stretch font_style font_weight
|
@@ -49,7 +49,7 @@ module Magick
|
|
49
49
|
end
|
50
50
|
end # class Styles
|
51
51
|
|
52
|
-
|
52
|
+
# :startdoc:
|
53
53
|
|
54
54
|
# This module is mixed into classes that can have styles.
|
55
55
|
module Stylable
|
data/lib/rvg/units.rb
CHANGED
data/rmagick.gemspec
CHANGED
@@ -5,7 +5,6 @@ require './lib/rmagick/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'rmagick'
|
7
7
|
s.version = Magick::VERSION
|
8
|
-
s.date = Date.today.to_s
|
9
8
|
s.summary = 'Ruby binding to ImageMagick'
|
10
9
|
s.description = 'RMagick is an interface between Ruby and ImageMagick.'
|
11
10
|
s.authors = ['Tim Hunter', 'Omer Bar-or', 'Benjamin Thomas', 'Moncef Maiza']
|
@@ -13,6 +12,10 @@ Gem::Specification.new do |s|
|
|
13
12
|
s.homepage = 'https://github.com/rmagick/rmagick'
|
14
13
|
s.license = 'MIT'
|
15
14
|
|
15
|
+
s.metadata['bug_tracker_uri'] = 'https://github.com/rmagick/rmagick/issues'
|
16
|
+
s.metadata['documentation_uri'] = 'https://rmagick.github.io/'
|
17
|
+
s.metadata['changelog_uri'] = 'https://github.com/rmagick/rmagick/blob/main/CHANGELOG.md'
|
18
|
+
|
16
19
|
tracked_files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
|
17
20
|
file_exclusion_regex = /\A(doc|benchmarks|examples|spec|Steepfile)/
|
18
21
|
files = tracked_files.reject { |file| file[file_exclusion_regex] }
|
@@ -24,6 +27,6 @@ Gem::Specification.new do |s|
|
|
24
27
|
s.required_ruby_version = ">= #{Magick::MIN_RUBY_VERSION}"
|
25
28
|
s.requirements << "ImageMagick #{Magick::MIN_IM_VERSION} or later"
|
26
29
|
|
27
|
-
s.add_runtime_dependency 'pkg-config', '~> 1.4'
|
28
30
|
s.add_runtime_dependency 'observer', '~> 0.1'
|
31
|
+
s.add_runtime_dependency 'pkg-config', '~> 1.4'
|
29
32
|
end
|
@@ -222,8 +222,6 @@ module Magick
|
|
222
222
|
def delete_compose_mask: () -> self
|
223
223
|
def delete_profile: (string name) -> self
|
224
224
|
def despeckle: () -> Image
|
225
|
-
def destroy!: () -> self
|
226
|
-
def destroyed?: () -> bool
|
227
225
|
def difference: (magick_image other) -> [Float, Float, Float]
|
228
226
|
def dispatch: (int x, int y, int columns, int rows, string map, ?bool float) -> Array[Integer]
|
229
227
|
def displace: (magick_image displacement_map, magick_real x_amp, ?magick_real y_amp, ?GravityType gravity, ?int x_offset, ?int y_offset) -> Image
|
data/sig/rmagick/enum.rbs
CHANGED
@@ -83,7 +83,12 @@ module Magick
|
|
83
83
|
BlackChannel: ChannelType
|
84
84
|
IndexChannel: ChannelType
|
85
85
|
GrayChannel: ChannelType
|
86
|
+
CompositeChannels: ChannelType
|
86
87
|
AllChannels: ChannelType
|
88
|
+
TrueAlphaChannel: ChannelType
|
89
|
+
RGBChannels: ChannelType
|
90
|
+
GrayChannels: ChannelType
|
91
|
+
SyncChannels: ChannelType
|
87
92
|
AlphaChannel: ChannelType
|
88
93
|
DefaultChannels: ChannelType
|
89
94
|
HueChannel: ChannelType
|
@@ -270,6 +275,7 @@ module Magick
|
|
270
275
|
extend _EnumClassMethod[DisposeType]
|
271
276
|
end
|
272
277
|
|
278
|
+
UnrecognizedDispose: DisposeType
|
273
279
|
UndefinedDispose: DisposeType
|
274
280
|
BackgroundDispose: DisposeType
|
275
281
|
NoneDispose: DisposeType
|
data/sig/rmagick/image.rbs
CHANGED
data/sig/rmagick/image_list.rbs
CHANGED
@@ -155,6 +155,8 @@ module Magick
|
|
155
155
|
| () { (Image::Info) -> void} -> String?
|
156
156
|
def write: (File | string file) -> self
|
157
157
|
| (File | string file) { (Image::Info) -> void } -> self
|
158
|
+
def destroy!: () -> self
|
159
|
+
def destroyed?: () -> bool
|
158
160
|
|
159
161
|
class Montage
|
160
162
|
def initialize: () -> void
|
metadata
CHANGED
@@ -1,46 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmagick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Hunter
|
8
8
|
- Omer Bar-or
|
9
9
|
- Benjamin Thomas
|
10
10
|
- Moncef Maiza
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
17
|
+
name: observer
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
20
|
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '1
|
22
|
+
version: '0.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '1
|
29
|
+
version: '0.1'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: pkg-config
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '1.4'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '1.4'
|
44
44
|
description: RMagick is an interface between Ruby and ImageMagick.
|
45
45
|
email: github@benjaminfleischer.com
|
46
46
|
executables: []
|
@@ -137,8 +137,11 @@ files:
|
|
137
137
|
homepage: https://github.com/rmagick/rmagick
|
138
138
|
licenses:
|
139
139
|
- MIT
|
140
|
-
metadata:
|
141
|
-
|
140
|
+
metadata:
|
141
|
+
bug_tracker_uri: https://github.com/rmagick/rmagick/issues
|
142
|
+
documentation_uri: https://rmagick.github.io/
|
143
|
+
changelog_uri: https://github.com/rmagick/rmagick/blob/main/CHANGELOG.md
|
144
|
+
post_install_message:
|
142
145
|
rdoc_options: []
|
143
146
|
require_paths:
|
144
147
|
- lib
|
@@ -147,16 +150,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
150
|
requirements:
|
148
151
|
- - ">="
|
149
152
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
153
|
+
version: 3.0.0
|
151
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
155
|
requirements:
|
153
156
|
- - ">="
|
154
157
|
- !ruby/object:Gem::Version
|
155
158
|
version: '0'
|
156
159
|
requirements:
|
157
|
-
- ImageMagick 6.
|
158
|
-
rubygems_version: 3.
|
159
|
-
signing_key:
|
160
|
+
- ImageMagick 6.8.9 or later
|
161
|
+
rubygems_version: 3.5.9
|
162
|
+
signing_key:
|
160
163
|
specification_version: 4
|
161
164
|
summary: Ruby binding to ImageMagick
|
162
165
|
test_files: []
|