rmagick 5.1.0 → 5.3.0
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 +65 -6
- data/.gitignore +2 -0
- data/CHANGELOG.md +20 -0
- data/README.md +1 -2
- data/Rakefile +53 -81
- data/before_install_linux.sh +3 -3
- data/before_install_osx.sh +5 -5
- data/ext/RMagick/extconf.rb +2 -1
- data/ext/RMagick/rmdraw.c +34 -3
- data/ext/RMagick/rmilist.c +2 -2
- data/ext/RMagick/rmimage.c +6 -4
- data/ext/RMagick/rmmain.c +8 -2
- data/lib/rmagick/version.rb +1 -1
- data/lib/rmagick_internal.rb +1 -1
- metadata +6 -7
- data/.codeclimate.yml +0 -63
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb6efb1cd1084ddfa7fcf81fa760b652ff8c2cf02609da08744931b71bfa5af9
|
|
4
|
+
data.tar.gz: 66a715d679ea9114f0525cdd5ee60643b8fb84f9f96548a1d82a27e8fc9d0821
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '057860ced79ea3612eaae3df6840c57833da74b4eb25ddca45da7d40bf6577cbc6288b1a807dc9c9f8aeb6b0a652f3fe13007166fac2094ec9e75b59e170adf4'
|
|
7
|
+
data.tar.gz: df562bbda78354a5b595c2494ce6971b6a51c068df580cebd22c9accfb99c73f12ecaf55ab8c9b4f7f25a2cd05530a9b53af77fc29791ee9825bd6ef6b82320a
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -30,16 +30,24 @@ jobs:
|
|
|
30
30
|
timeout-minutes: 20
|
|
31
31
|
strategy:
|
|
32
32
|
matrix:
|
|
33
|
-
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1']
|
|
33
|
+
ruby-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
|
|
34
34
|
imagemagick-version:
|
|
35
35
|
- { full: 6.7.7-10, major-minor: '6.7' }
|
|
36
36
|
- { full: 6.8.9-10, major-minor: '6.8' }
|
|
37
|
-
- { full: 6.9.12-
|
|
38
|
-
- { full: 7.
|
|
37
|
+
- { full: 6.9.12-85, major-minor: '6.9' }
|
|
38
|
+
- { full: 7.0.11-14, major-minor: '7.0' }
|
|
39
|
+
- { full: 7.1.1-7, major-minor: '7.1' }
|
|
39
40
|
|
|
40
41
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
41
42
|
steps:
|
|
42
43
|
- uses: actions/checkout@v3
|
|
44
|
+
- name: Cache ImageMagick built objects
|
|
45
|
+
uses: actions/cache@v3
|
|
46
|
+
with:
|
|
47
|
+
path: ./build-ImageMagick
|
|
48
|
+
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
|
49
|
+
restore-keys: |
|
|
50
|
+
v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
|
43
51
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
44
52
|
uses: ruby/setup-ruby@master
|
|
45
53
|
with:
|
|
@@ -58,14 +66,22 @@ jobs:
|
|
|
58
66
|
timeout-minutes: 20
|
|
59
67
|
strategy:
|
|
60
68
|
matrix:
|
|
61
|
-
ruby-version: ['2.6', '2.7', '3.0', '3.1']
|
|
69
|
+
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
|
|
62
70
|
imagemagick-version:
|
|
63
|
-
- { full: 6.9.12-
|
|
64
|
-
- { full: 7.
|
|
71
|
+
- { full: 6.9.12-85, major-minor: '6.9' }
|
|
72
|
+
- { full: 7.0.11-14, major-minor: '7.0' }
|
|
73
|
+
- { full: 7.1.1-7, major-minor: '7.1' }
|
|
65
74
|
|
|
66
75
|
name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
67
76
|
steps:
|
|
68
77
|
- uses: actions/checkout@v3
|
|
78
|
+
- name: Cache ImageMagick built objects
|
|
79
|
+
uses: actions/cache@v3
|
|
80
|
+
with:
|
|
81
|
+
path: ./build-ImageMagick
|
|
82
|
+
key: v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
|
83
|
+
restore-keys: |
|
|
84
|
+
v1-${{ runner.os }}-imagemagick-${{ matrix.imagemagick-version.full }}
|
|
69
85
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
70
86
|
uses: ruby/setup-ruby@master
|
|
71
87
|
with:
|
|
@@ -77,3 +93,46 @@ jobs:
|
|
|
77
93
|
run: |
|
|
78
94
|
bundle install --path=vendor/bundle --jobs 4 --retry 3
|
|
79
95
|
bundle exec rake
|
|
96
|
+
|
|
97
|
+
test-windows:
|
|
98
|
+
runs-on: windows-latest
|
|
99
|
+
timeout-minutes: 20
|
|
100
|
+
strategy:
|
|
101
|
+
matrix:
|
|
102
|
+
ruby-version: ['3.2']
|
|
103
|
+
imagemagick-version:
|
|
104
|
+
- { full: 6.9.12-85, major-minor: '6.9' }
|
|
105
|
+
- { full: 7.1.1-7, major-minor: '7.1' }
|
|
106
|
+
env:
|
|
107
|
+
bundled_im_dir: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI
|
|
108
|
+
install_im_dir: D:\ImageMagick
|
|
109
|
+
|
|
110
|
+
name: MSWin, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
111
|
+
steps:
|
|
112
|
+
- uses: actions/checkout@v3
|
|
113
|
+
- name: Setup environment variable
|
|
114
|
+
# https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos
|
|
115
|
+
run: |
|
|
116
|
+
Add-Content $env:GITHUB_PATH ${{ env.install_im_dir }}
|
|
117
|
+
- name: Uninstall bundled ImageMagick
|
|
118
|
+
# Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
|
|
119
|
+
run: |
|
|
120
|
+
Start-Process -FilePath "${{ env.bundled_im_dir }}\unins000.exe" -ArgumentList "/VERYSILENT /NORESTART"
|
|
121
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
122
|
+
uses: ruby/setup-ruby@master
|
|
123
|
+
with:
|
|
124
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
125
|
+
- name: Install ghostscript
|
|
126
|
+
run: |
|
|
127
|
+
choco install ghostscript
|
|
128
|
+
- name: Install ImageMagick
|
|
129
|
+
# https://github.com/rmagick/ImageMagick-binaries
|
|
130
|
+
run: |
|
|
131
|
+
$imagemagick_version = "${{ matrix.imagemagick-version.full }}"
|
|
132
|
+
$installer_name = "ImageMagick-$($imagemagick_version)-Q16-x64-dll.exe"
|
|
133
|
+
$url = "https://github.com/rmagick/ImageMagick-binaries/raw/main/$($installer_name)"
|
|
134
|
+
Invoke-WebRequest -Uri $url -OutFile $installer_name
|
|
135
|
+
Start-Process -FilePath $installer_name -ArgumentList "/DIR=${{ env.install_im_dir }} /VERYSILENT /NORESTART /TASKS=install_Devel"
|
|
136
|
+
- name: Build and test with Rake
|
|
137
|
+
run: |
|
|
138
|
+
cmd.exe /D /S /C "bundle install --path=vendor/bundle --retry 3 & bundle exec rake"
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,29 @@
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
|
6
|
+
## RMagick 5.3.0
|
|
7
|
+
|
|
8
|
+
Improvements
|
|
9
|
+
|
|
10
|
+
- Support GC compaction (#1388)
|
|
11
|
+
|
|
12
|
+
Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Fix memory leak in `Magick::Draw` for recentry ImageMagick 6 by removing unnecessary `GetDrawInfo()` calling (#1406)
|
|
15
|
+
- Fix crash on ImageList#write with animation gif (#1379)
|
|
16
|
+
- Windows: Fix RubyInstaller::Runtime::DllDirectory::WinApiError (#1381)
|
|
17
|
+
|
|
18
|
+
## RMagick 5.2.0
|
|
19
|
+
|
|
20
|
+
Improvements
|
|
21
|
+
|
|
22
|
+
- Add OnAlphaChannel and OffAlphaChannel to the AlphaChannelOption enumeration. (#1377)
|
|
23
|
+
- Add Ruby 3.2 support (#1370)
|
|
24
|
+
|
|
6
25
|
## RMagick 5.1.0
|
|
7
26
|
|
|
8
27
|
Improvements
|
|
28
|
+
|
|
9
29
|
- Improve multi-thread performance by releasing GVL (#1352)
|
|
10
30
|
- Add Ractor support (#1349)
|
|
11
31
|
- Avoid overriding compilation variables (#1365)
|
data/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
RMagick
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
-
[](https://app.codacy.com/gh/rmagick/rmagick?utm_source=github.com&utm_medium=referral&utm_content=rmagick/rmagick&utm_campaign=Badge_Grade_Settings)
|
|
5
4
|
[](https://rubygems.org/gems/rmagick)
|
|
6
5
|

|
|
7
6
|
|
|
@@ -105,7 +104,7 @@ brew install imagemagick@6
|
|
|
105
104
|
2. You might need to configure `PATH` environment variable to where the compiler is located.
|
|
106
105
|
(Ex: `set PATH=C:\Ruby27-x64\msys64\usr\bin;C:\Ruby27-x64\msys64\mingw64\bin;%PATH%`)
|
|
107
106
|
3. Download `ImageMagick-7.XXXX-Q16-x64-dll.exe` (not, `ImageMagick-7.XXXX-Q16-x64-static.exe`) binary from [Windows Binary Release](https://imagemagick.org/script/download.php#windows), or you can download ImageMagick 6 from [Windows Binary Release](https://legacy.imagemagick.org/script/download.php#windows).
|
|
108
|
-
4. Install ImageMagick. You need to turn on checkboxes `Add application directory to your system path` and `Install development headers and
|
|
107
|
+
4. Install ImageMagick. You need to turn on checkboxes `Add application directory to your system path` and `Install development headers and libraries for C and C++` in an installer for RMagick.
|
|
109
108
|
<img width="50%" src="https://user-images.githubusercontent.com/199156/77183472-b72cbd00-6b11-11ea-8b9a-247bc1f9d8b1.png" />
|
|
110
109
|
|
|
111
110
|
Installing RMagick
|
data/Rakefile
CHANGED
|
@@ -63,26 +63,13 @@ end
|
|
|
63
63
|
desc 'Release'
|
|
64
64
|
task release: %i[assert_clean_repo push_and_tag]
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
namespace :website do
|
|
67
|
+
PATH_TO_LOCAL_WEBSITE_REPOSITORY = File.expand_path('../rmagick.github.io')
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
require 'find'
|
|
71
|
-
|
|
72
|
-
task :redcloth do
|
|
73
|
-
require 'redcloth'
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
README = 'README.html'
|
|
77
|
-
MANIFEST = 'ext/RMagick/MANIFEST'
|
|
78
|
-
|
|
79
|
-
# Change the version number placeholders in a file.
|
|
80
|
-
# Returns an array of lines from the file.
|
|
81
|
-
def reversion(name)
|
|
69
|
+
def replace_reversion(lines)
|
|
82
70
|
now = Time.new
|
|
83
71
|
now = now.strftime('%m/%d/%y')
|
|
84
72
|
|
|
85
|
-
lines = File.readlines name
|
|
86
73
|
lines.each do |line|
|
|
87
74
|
line.gsub!(/0\.0\.0/, Magick::VERSION)
|
|
88
75
|
line.gsub!(%r{YY/MM/DD}, now)
|
|
@@ -90,83 +77,68 @@ namespace :legacy do
|
|
|
90
77
|
lines
|
|
91
78
|
end
|
|
92
79
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
lines =
|
|
96
|
-
|
|
97
|
-
mv name, tmp_name
|
|
98
|
-
begin
|
|
99
|
-
File.open(name, 'w') { |f| lines.each { |line| f.write line } }
|
|
100
|
-
rescue StandardError
|
|
101
|
-
mv tmp_name, name
|
|
102
|
-
ensure
|
|
103
|
-
rm tmp_name
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
desc 'Update version in extconf'
|
|
108
|
-
task :extconf do
|
|
109
|
-
reversion_file 'ext/RMagick/extconf.rb'
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
desc 'Build README.txt from README.textile using RedCloth'
|
|
113
|
-
task 'README.txt' => [:redcloth] do
|
|
114
|
-
reversion_file 'README.textile'
|
|
115
|
-
body = File.readlines 'README.textile'
|
|
116
|
-
body = RedCloth.new(body.join).to_html + "\n"
|
|
117
|
-
File.open('README.txt', 'w') { |f| f.write body }
|
|
80
|
+
def update_html(input_dir, output_dir, file_name)
|
|
81
|
+
lines = File.readlines(File.join(input_dir, file_name))
|
|
82
|
+
lines = replace_reversion(lines)
|
|
83
|
+
File.open(File.join(output_dir, file_name), 'w') { |f| lines.each { |line| f.write line } }
|
|
118
84
|
end
|
|
119
85
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
86
|
+
ENTITY = {
|
|
87
|
+
'&' => '&',
|
|
88
|
+
'>' => '>',
|
|
89
|
+
'<' => '<'
|
|
90
|
+
}.freeze
|
|
91
|
+
|
|
92
|
+
def file_to_html(input_dir, input_file_name, output_dir, output_file_name)
|
|
93
|
+
File.open(File.join(input_dir, input_file_name)) do |src|
|
|
94
|
+
File.open(File.join(output_dir, output_file_name), 'w') do |dest|
|
|
95
|
+
dest.puts <<~END_EXHTMLHEAD
|
|
96
|
+
<!DOCTYPE public PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
97
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
127
98
|
<head>
|
|
128
|
-
<
|
|
129
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
|
130
|
-
<
|
|
99
|
+
<meta name="generator" content="ex2html.rb" />
|
|
100
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
101
|
+
<link rel="stylesheet" type="text/css" href="css/popup.css" />
|
|
102
|
+
<title>RMagick example: #{input_file_name}</title>
|
|
131
103
|
</head>
|
|
132
104
|
<body>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
105
|
+
<h1>#{input_file_name}</h1>
|
|
106
|
+
<div class="bodybox">
|
|
107
|
+
<div class="bodyfloat">
|
|
108
|
+
<pre>
|
|
109
|
+
END_EXHTMLHEAD
|
|
110
|
+
|
|
111
|
+
src.each do |line|
|
|
112
|
+
line.gsub!(/[&><]/) { |s| ENTITY[s] }
|
|
113
|
+
dest.puts(line)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
dest.puts <<~END_EXHTMLTAIL
|
|
117
|
+
</pre>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div id="close"><a href="javascript:window.close();">Close window</a></div>
|
|
136
121
|
</body>
|
|
137
|
-
|
|
138
|
-
|
|
122
|
+
</html>
|
|
123
|
+
END_EXHTMLTAIL
|
|
124
|
+
end
|
|
139
125
|
end
|
|
140
126
|
end
|
|
141
127
|
|
|
142
|
-
desc 'Update
|
|
143
|
-
task :
|
|
144
|
-
|
|
145
|
-
|
|
128
|
+
desc 'Update RMagick website'
|
|
129
|
+
task :update do
|
|
130
|
+
unless File.exist?(PATH_TO_LOCAL_WEBSITE_REPOSITORY)
|
|
131
|
+
puts "Please clone the rmagick.github.io repository to #{PATH_TO_LOCAL_WEBSITE_REPOSITORY}"
|
|
132
|
+
exit 1
|
|
146
133
|
end
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Remove files we don't want in the tarball.
|
|
150
|
-
# Ensure files are not executable. (ref: bug #10080)
|
|
151
|
-
desc "Remove files we don't want in the .gem; ensure files are not executable"
|
|
152
|
-
task :fix_files do
|
|
153
|
-
rm 'README.txt', verbose: true
|
|
154
|
-
chmod 0o644, FileList['doc/*.html', 'doc/ex/*.rb', 'doc/ex/images/*', 'examples/*.rb']
|
|
155
|
-
end
|
|
156
134
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
now = now.strftime('%H:%M:%S %m/%d/%y')
|
|
161
|
-
puts "generating #{MANIFEST}"
|
|
162
|
-
|
|
163
|
-
File.open(MANIFEST, 'w') do |f|
|
|
164
|
-
f.puts "MANIFEST for #{Magick::VERSION} - #{now}\n\n"
|
|
165
|
-
Find.find('.') do |name|
|
|
166
|
-
next if File.directory? name
|
|
135
|
+
Dir.glob('doc/*.html') do |file|
|
|
136
|
+
update_html('doc', PATH_TO_LOCAL_WEBSITE_REPOSITORY, File.basename(file))
|
|
137
|
+
end
|
|
167
138
|
|
|
168
|
-
|
|
169
|
-
|
|
139
|
+
Dir.glob('doc/ex/*.rb') do |file|
|
|
140
|
+
file_name = File.basename(file)
|
|
141
|
+
file_to_html('doc/ex', file_name, PATH_TO_LOCAL_WEBSITE_REPOSITORY, "#{file_name}.html")
|
|
170
142
|
end
|
|
171
143
|
end
|
|
172
144
|
end
|
data/before_install_linux.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
set -euox pipefail
|
|
4
4
|
|
|
5
|
-
gem install bundler
|
|
5
|
+
gem install bundler -v 2.3.26 # Bundler 2.4.x has dropped support for Ruby 2.3
|
|
6
6
|
|
|
7
7
|
if [ -v STYLE_CHECKS ]; then
|
|
8
8
|
set +ux
|
|
@@ -24,7 +24,7 @@ sudo apt-get autoremove -y imagemagick* libmagick* --purge
|
|
|
24
24
|
# install build tools, ImageMagick delegates
|
|
25
25
|
sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \
|
|
26
26
|
liblcms2-dev libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev \
|
|
27
|
-
libtiff5-dev libwebp-dev liblqr-1-0-dev vim gsfonts ghostscript
|
|
27
|
+
libtiff5-dev libwebp-dev liblqr-1-0-dev vim gsfonts ghostscript
|
|
28
28
|
|
|
29
29
|
if [ ! -d /usr/include/freetype ]; then
|
|
30
30
|
# If `/usr/include/freetype` is not existed, ImageMagick 6.7 configuration fails about Freetype.
|
|
@@ -52,7 +52,7 @@ build_imagemagick() {
|
|
|
52
52
|
fi
|
|
53
53
|
|
|
54
54
|
cd "${build_dir}"
|
|
55
|
-
|
|
55
|
+
./configure --prefix=/usr "${options}"
|
|
56
56
|
make -j
|
|
57
57
|
}
|
|
58
58
|
|
data/before_install_osx.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
set -euox pipefail
|
|
4
4
|
|
|
5
|
-
gem install bundler
|
|
5
|
+
gem install bundler -v 2.3.26 # Bundler 2.4.x has dropped support for Ruby 2.3
|
|
6
6
|
|
|
7
7
|
if [ -v STYLE_CHECKS ]; then
|
|
8
8
|
set +ux
|
|
@@ -17,10 +17,10 @@ fi
|
|
|
17
17
|
|
|
18
18
|
export HOMEBREW_NO_AUTO_UPDATE=true
|
|
19
19
|
brew uninstall --force imagemagick imagemagick@6
|
|
20
|
-
brew install wget ghostscript freetype jpeg little-cms2 libomp libpng libtiff liblqr libtool zlib webp
|
|
20
|
+
brew install wget ghostscript freetype jpeg little-cms2 openexr libomp libpng libtiff liblqr libtool zlib webp
|
|
21
21
|
|
|
22
|
-
export LDFLAGS="-L
|
|
23
|
-
export CPPFLAGS="-I/
|
|
22
|
+
export LDFLAGS="-L$(brew --prefix libxml2)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix glib)/lib -L$(brew --prefix openexr)/lib"
|
|
23
|
+
export CPPFLAGS="-I$(brew --prefix libxml2)/include -I$(brew --prefix zlib)/include -I$(brew --prefix glib)/include/glib-2.0 -I$(brew --prefix glib)/lib/glib-2.0/include -I$(brew --prefix openexr)/include/OpenEXR"
|
|
24
24
|
|
|
25
25
|
project_dir=$(pwd)
|
|
26
26
|
build_dir="${project_dir}/build-ImageMagick/ImageMagick-${IMAGEMAGICK_VERSION}"
|
|
@@ -43,7 +43,7 @@ build_imagemagick() {
|
|
|
43
43
|
fi
|
|
44
44
|
|
|
45
45
|
cd "${build_dir}"
|
|
46
|
-
./configure --prefix=/usr/local "${options}"
|
|
46
|
+
./configure --prefix=/usr/local "${options}" --without-raw
|
|
47
47
|
make -j
|
|
48
48
|
}
|
|
49
49
|
|
data/ext/RMagick/extconf.rb
CHANGED
data/ext/RMagick/rmdraw.c
CHANGED
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
#include "rmagick.h"
|
|
14
14
|
#include "float.h"
|
|
15
15
|
|
|
16
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
|
17
|
+
static void Draw_compact(void *drawptr);
|
|
18
|
+
#endif
|
|
16
19
|
static void Draw_mark(void *);
|
|
17
20
|
static void Draw_destroy(void *);
|
|
18
21
|
static size_t Draw_memsize(const void *);
|
|
@@ -21,7 +24,14 @@ static VALUE get_type_metrics(int, VALUE *, VALUE, gvl_function_t);
|
|
|
21
24
|
|
|
22
25
|
const rb_data_type_t rm_draw_data_type = {
|
|
23
26
|
"Magick::Draw",
|
|
24
|
-
{
|
|
27
|
+
{
|
|
28
|
+
Draw_mark,
|
|
29
|
+
Draw_destroy,
|
|
30
|
+
Draw_memsize,
|
|
31
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
|
32
|
+
Draw_compact,
|
|
33
|
+
#endif
|
|
34
|
+
},
|
|
25
35
|
0, 0,
|
|
26
36
|
RUBY_TYPED_FROZEN_SHAREABLE,
|
|
27
37
|
};
|
|
@@ -1267,6 +1277,25 @@ Draw_primitive(VALUE self, VALUE primitive)
|
|
|
1267
1277
|
return self;
|
|
1268
1278
|
}
|
|
1269
1279
|
|
|
1280
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
|
1281
|
+
/**
|
|
1282
|
+
* Compact the objects.
|
|
1283
|
+
*
|
|
1284
|
+
* No Ruby usage (internal function)
|
|
1285
|
+
*
|
|
1286
|
+
* @param drawptr pointer to a Draw object
|
|
1287
|
+
*/
|
|
1288
|
+
static void
|
|
1289
|
+
Draw_compact(void *drawptr)
|
|
1290
|
+
{
|
|
1291
|
+
Draw *draw = (Draw *)drawptr;
|
|
1292
|
+
|
|
1293
|
+
if (draw->primitives != (VALUE)0)
|
|
1294
|
+
{
|
|
1295
|
+
draw->primitives = rb_gc_location(draw->primitives);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
#endif
|
|
1270
1299
|
|
|
1271
1300
|
/**
|
|
1272
1301
|
* Mark referenced objects.
|
|
@@ -1282,7 +1311,11 @@ Draw_mark(void *drawptr)
|
|
|
1282
1311
|
|
|
1283
1312
|
if (draw->primitives != (VALUE)0)
|
|
1284
1313
|
{
|
|
1314
|
+
#ifdef HAVE_RB_GC_MARK_MOVABLE
|
|
1315
|
+
rb_gc_mark_movable(draw->primitives);
|
|
1316
|
+
#else
|
|
1285
1317
|
rb_gc_mark(draw->primitives);
|
|
1318
|
+
#endif
|
|
1286
1319
|
}
|
|
1287
1320
|
}
|
|
1288
1321
|
|
|
@@ -1387,8 +1420,6 @@ DrawOptions_initialize(VALUE self)
|
|
|
1387
1420
|
rb_raise(rb_eNoMemError, "not enough memory to continue");
|
|
1388
1421
|
}
|
|
1389
1422
|
|
|
1390
|
-
GetDrawInfo(NULL, draw_options->info);
|
|
1391
|
-
|
|
1392
1423
|
if (rb_block_given_p())
|
|
1393
1424
|
{
|
|
1394
1425
|
rb_yield(self);
|
data/ext/RMagick/rmilist.c
CHANGED
|
@@ -1193,8 +1193,8 @@ ImageList_write(VALUE self, VALUE file)
|
|
|
1193
1193
|
|
|
1194
1194
|
// Ensure file is open - raise error if not
|
|
1195
1195
|
GetOpenFile(file, fptr);
|
|
1196
|
-
#if defined(_WIN32)
|
|
1197
1196
|
add_format_prefix(info, fptr->pathv);
|
|
1197
|
+
#if defined(_WIN32)
|
|
1198
1198
|
SetImageInfoFile(info, NULL);
|
|
1199
1199
|
#else
|
|
1200
1200
|
SetImageInfoFile(info, rb_io_stdio_file(fptr));
|
|
@@ -1229,7 +1229,7 @@ ImageList_write(VALUE self, VALUE file)
|
|
|
1229
1229
|
#endif
|
|
1230
1230
|
|
|
1231
1231
|
// Tell WriteImage if we want a multi-images file.
|
|
1232
|
-
if (imagelist_length(self) > 1L && GetMagickAdjoin(m))
|
|
1232
|
+
if (imagelist_length(self) > 1L && m && GetMagickAdjoin(m))
|
|
1233
1233
|
{
|
|
1234
1234
|
info->adjoin = MagickTrue;
|
|
1235
1235
|
}
|
data/ext/RMagick/rmimage.c
CHANGED
|
@@ -15804,6 +15804,10 @@ void add_format_prefix(Info *info, VALUE file)
|
|
|
15804
15804
|
char *p;
|
|
15805
15805
|
|
|
15806
15806
|
// Convert arg to string. If an exception occurs raise an error condition.
|
|
15807
|
+
if (rb_respond_to(file, rb_intern("path")))
|
|
15808
|
+
{
|
|
15809
|
+
FilePathStringValue(file);
|
|
15810
|
+
}
|
|
15807
15811
|
file = rb_rescue(rb_String, file, file_arg_rescue, file);
|
|
15808
15812
|
|
|
15809
15813
|
filename = rm_str2cstr(file, &filename_l);
|
|
@@ -15899,21 +15903,19 @@ Image_write(VALUE self, VALUE file)
|
|
|
15899
15903
|
// Ensure file is open - raise error if not
|
|
15900
15904
|
GetOpenFile(file, fptr);
|
|
15901
15905
|
rb_io_check_writable(fptr);
|
|
15902
|
-
#if defined(_WIN32)
|
|
15903
15906
|
add_format_prefix(info, fptr->pathv);
|
|
15904
|
-
|
|
15907
|
+
#if defined(_WIN32)
|
|
15905
15908
|
SetImageInfoFile(info, NULL);
|
|
15906
15909
|
#else
|
|
15907
15910
|
SetImageInfoFile(info, rb_io_stdio_file(fptr));
|
|
15908
|
-
memset(image->filename, 0, sizeof(image->filename));
|
|
15909
15911
|
#endif
|
|
15910
15912
|
}
|
|
15911
15913
|
else
|
|
15912
15914
|
{
|
|
15913
15915
|
add_format_prefix(info, file);
|
|
15914
|
-
strlcpy(image->filename, info->filename, sizeof(image->filename));
|
|
15915
15916
|
SetImageInfoFile(info, NULL);
|
|
15916
15917
|
}
|
|
15918
|
+
strlcpy(image->filename, info->filename, sizeof(image->filename));
|
|
15917
15919
|
|
|
15918
15920
|
rm_sync_image_options(image, info);
|
|
15919
15921
|
|
data/ext/RMagick/rmmain.c
CHANGED
|
@@ -1056,6 +1056,13 @@ Init_RMagick2(void)
|
|
|
1056
1056
|
#if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_8_9)
|
|
1057
1057
|
ENUMERATOR(AssociateAlphaChannel)
|
|
1058
1058
|
ENUMERATOR(DisassociateAlphaChannel)
|
|
1059
|
+
#endif
|
|
1060
|
+
#if defined(IMAGEMAGICK_7)
|
|
1061
|
+
ENUMERATOR(OnAlphaChannel)
|
|
1062
|
+
ENUMERATOR(OffAlphaChannel)
|
|
1063
|
+
#else
|
|
1064
|
+
ENUMERATORV(OnAlphaChannel, ActivateAlphaChannel)
|
|
1065
|
+
ENUMERATORV(OffAlphaChannel, DeactivateAlphaChannel)
|
|
1059
1066
|
#endif
|
|
1060
1067
|
END_ENUM
|
|
1061
1068
|
|
|
@@ -1917,8 +1924,7 @@ version_constants(void)
|
|
|
1917
1924
|
"This is %s ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter\n"
|
|
1918
1925
|
"Built with %s\n"
|
|
1919
1926
|
"Built for %s\n"
|
|
1920
|
-
"Web page:
|
|
1921
|
-
"Email: rmagick@rubyforge.org\n",
|
|
1927
|
+
"Web page: https://rmagick.github.io/\n",
|
|
1922
1928
|
Q(RMAGICK_VERSION_STRING), mgk_version, Q(RUBY_VERSION_STRING));
|
|
1923
1929
|
|
|
1924
1930
|
str = rb_str_new2(long_version);
|
data/lib/rmagick/version.rb
CHANGED
data/lib/rmagick_internal.rb
CHANGED
|
@@ -14,7 +14,7 @@ if RUBY_PLATFORM =~ /mingw/i
|
|
|
14
14
|
begin
|
|
15
15
|
require 'ruby_installer'
|
|
16
16
|
ENV['PATH'].split(File::PATH_SEPARATOR).grep(/ImageMagick/i).each do |path|
|
|
17
|
-
RubyInstaller::Runtime.add_dll_directory(path)
|
|
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
18
|
end
|
|
19
19
|
rescue LoadError
|
|
20
20
|
end
|
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rmagick
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.3.0
|
|
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:
|
|
14
|
+
date: 2023-07-19 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: pkg-config
|
|
@@ -160,7 +160,6 @@ extensions:
|
|
|
160
160
|
- ext/RMagick/extconf.rb
|
|
161
161
|
extra_rdoc_files: []
|
|
162
162
|
files:
|
|
163
|
-
- ".codeclimate.yml"
|
|
164
163
|
- ".devcontainer/Dockerfile"
|
|
165
164
|
- ".devcontainer/ImageMagick6/devcontainer.json"
|
|
166
165
|
- ".devcontainer/devcontainer.json"
|
|
@@ -221,7 +220,7 @@ homepage: https://github.com/rmagick/rmagick
|
|
|
221
220
|
licenses:
|
|
222
221
|
- MIT
|
|
223
222
|
metadata: {}
|
|
224
|
-
post_install_message:
|
|
223
|
+
post_install_message:
|
|
225
224
|
rdoc_options: []
|
|
226
225
|
require_paths:
|
|
227
226
|
- lib
|
|
@@ -238,8 +237,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
238
237
|
version: '0'
|
|
239
238
|
requirements:
|
|
240
239
|
- ImageMagick 6.7.7 or later
|
|
241
|
-
rubygems_version: 3.
|
|
242
|
-
signing_key:
|
|
240
|
+
rubygems_version: 3.4.1
|
|
241
|
+
signing_key:
|
|
243
242
|
specification_version: 4
|
|
244
243
|
summary: Ruby binding to ImageMagick
|
|
245
244
|
test_files: []
|
data/.codeclimate.yml
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
engines:
|
|
2
|
-
cppcheck:
|
|
3
|
-
enabled: true
|
|
4
|
-
checks:
|
|
5
|
-
variableScope:
|
|
6
|
-
enabled: false
|
|
7
|
-
toomanyconfigs:
|
|
8
|
-
enabled: false
|
|
9
|
-
invalidPrintfArgType_sint:
|
|
10
|
-
enabled: false
|
|
11
|
-
redundantAssignment:
|
|
12
|
-
enabled: false
|
|
13
|
-
selfAssignment:
|
|
14
|
-
enabled: false
|
|
15
|
-
unreachableCode:
|
|
16
|
-
enabled: false
|
|
17
|
-
unsignedLessThanZero:
|
|
18
|
-
enabled: false
|
|
19
|
-
toomanyconfigs:
|
|
20
|
-
enabled: false
|
|
21
|
-
complex-definition:
|
|
22
|
-
enabled: false
|
|
23
|
-
|
|
24
|
-
markdownlint:
|
|
25
|
-
enabled: true
|
|
26
|
-
checks:
|
|
27
|
-
# Line length
|
|
28
|
-
MD013:
|
|
29
|
-
enabled: false
|
|
30
|
-
# Emphasis used instead of a header
|
|
31
|
-
MD036:
|
|
32
|
-
enabled: false
|
|
33
|
-
# Hard tabs
|
|
34
|
-
MD010:
|
|
35
|
-
enabled: false
|
|
36
|
-
# Dollar signs used before commands without showing output
|
|
37
|
-
MD014:
|
|
38
|
-
enabled: false
|
|
39
|
-
# Headers should be surrounded by blank lines
|
|
40
|
-
MD022:
|
|
41
|
-
enabled: false
|
|
42
|
-
# Multiple consecutive blank lines
|
|
43
|
-
MD012:
|
|
44
|
-
enabled: false
|
|
45
|
-
# Bare URL used
|
|
46
|
-
MD034:
|
|
47
|
-
enabled: false
|
|
48
|
-
# Ordered list item prefix
|
|
49
|
-
MD029:
|
|
50
|
-
enabled: false
|
|
51
|
-
# Lists should be surrounded by blank lines
|
|
52
|
-
MD032:
|
|
53
|
-
enabled: false
|
|
54
|
-
# Code block style
|
|
55
|
-
MD046:
|
|
56
|
-
enabled: false
|
|
57
|
-
# Header style
|
|
58
|
-
MD003:
|
|
59
|
-
enabled: false
|
|
60
|
-
# Spaces after list markers
|
|
61
|
-
MD030:
|
|
62
|
-
enabled: false
|
|
63
|
-
|