rmagick 6.1.4 → 6.2.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 +87 -21
- data/.rubocop_todo.yml +21 -17
- data/CHANGELOG.md +16 -0
- data/Gemfile +2 -0
- data/README.md +16 -0
- data/Rakefile +8 -0
- data/ext/RMagick/extconf.rb +11 -7
- data/ext/RMagick/rmimage.cpp +11 -8
- data/ext/RMagick/rminfo.cpp +4 -2
- data/lib/rmagick/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76f2e11d828e48371aa5ff6b599cebff2e793b3751892cc864cd22015781c324
|
|
4
|
+
data.tar.gz: 65fa64db84769aa12a954bdd57ea7e03b8fcb61c1cebab89b2f9d833e8aab0aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1238aaf7239bf0ae5041682b6941fb52341283d6e8fe73c37d4c914e21c40a565d0f244fb923289647dc44d0f43bfbf2e0cd59e4a8ee99595ea32524b35bbd26
|
|
7
|
+
data.tar.gz: ba83bde0c15f3061ad9e0d656cc79a65985fc55b49ae340f7fa3fd2ef510127610d95d2d8692c2111a97b3f4673badd1a03f18d6b78abbbb169f30020bcbdd4b
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
timeout-minutes: 20
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
19
|
- name: Set up Ruby 3.3
|
|
20
20
|
uses: ruby/setup-ruby@master
|
|
21
21
|
with:
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
name: RBS
|
|
31
31
|
timeout-minutes: 20
|
|
32
32
|
steps:
|
|
33
|
-
- uses: actions/checkout@
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
34
|
- name: Set up Ruby 3.0
|
|
35
35
|
uses: ruby/setup-ruby@master
|
|
36
36
|
with:
|
|
@@ -55,7 +55,7 @@ jobs:
|
|
|
55
55
|
|
|
56
56
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
57
57
|
steps:
|
|
58
|
-
- uses: actions/checkout@
|
|
58
|
+
- uses: actions/checkout@v6
|
|
59
59
|
- name: Cache ImageMagick built objects
|
|
60
60
|
uses: actions/cache@v4
|
|
61
61
|
with:
|
|
@@ -82,14 +82,14 @@ jobs:
|
|
|
82
82
|
strategy:
|
|
83
83
|
fail-fast: false
|
|
84
84
|
matrix:
|
|
85
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
|
85
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
|
|
86
86
|
imagemagick-version:
|
|
87
|
-
- { full: 6.9.13-
|
|
88
|
-
- { full: 7.1.2-
|
|
87
|
+
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
88
|
+
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
89
89
|
|
|
90
90
|
name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
91
91
|
steps:
|
|
92
|
-
- uses: actions/checkout@
|
|
92
|
+
- uses: actions/checkout@v6
|
|
93
93
|
- name: Cache ImageMagick built objects
|
|
94
94
|
uses: actions/cache@v4
|
|
95
95
|
with:
|
|
@@ -116,14 +116,14 @@ jobs:
|
|
|
116
116
|
strategy:
|
|
117
117
|
fail-fast: false
|
|
118
118
|
matrix:
|
|
119
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
|
119
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
|
|
120
120
|
imagemagick-version:
|
|
121
|
-
- { full: 6.9.13-
|
|
122
|
-
- { full: 7.1.2-
|
|
121
|
+
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
122
|
+
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
123
123
|
|
|
124
124
|
name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
125
125
|
steps:
|
|
126
|
-
- uses: actions/checkout@
|
|
126
|
+
- uses: actions/checkout@v6
|
|
127
127
|
- name: Cache ImageMagick built objects
|
|
128
128
|
uses: actions/cache@v4
|
|
129
129
|
with:
|
|
@@ -149,36 +149,69 @@ jobs:
|
|
|
149
149
|
strategy:
|
|
150
150
|
fail-fast: false
|
|
151
151
|
matrix:
|
|
152
|
-
ruby-version: ['
|
|
152
|
+
ruby-version: ['4.0']
|
|
153
153
|
imagemagick-version:
|
|
154
|
-
- { full: 6.9.13-
|
|
155
|
-
- { full: 7.1.2-
|
|
154
|
+
- { full: 6.9.13-33, major-minor: '6.9' }
|
|
155
|
+
- { full: 7.1.2-8, major-minor: '7.1' }
|
|
156
156
|
os:
|
|
157
157
|
- { target: windows-latest, arch: 'x64' }
|
|
158
158
|
- { target: windows-11-arm, arch: 'arm64' }
|
|
159
159
|
exclude:
|
|
160
160
|
# ImageMagick 6 has not provided ARM binary. Ref. https://legacy.imagemagick.org/archive/binaries/
|
|
161
|
-
- imagemagick-version: { full: 6.9.13-
|
|
161
|
+
- imagemagick-version: { full: 6.9.13-33, major-minor: '6.9' }
|
|
162
162
|
os: { target: windows-11-arm, arch: 'arm64' }
|
|
163
163
|
|
|
164
164
|
env:
|
|
165
|
-
bundled_im_dir: ${{ matrix.os.arch == 'x64' && 'C:\Program Files\ImageMagick-7.1.2-Q16-HDRI' || 'C:\Program Files (x86)\ImageMagick-7.1.2-Q16-HDRI' }}
|
|
166
165
|
install_im_dir: C:\ImageMagick
|
|
166
|
+
install_gs_dir: C:\Ghostscript
|
|
167
167
|
|
|
168
168
|
name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }}
|
|
169
169
|
steps:
|
|
170
|
-
- uses: actions/checkout@
|
|
170
|
+
- uses: actions/checkout@v6
|
|
171
171
|
- name: Setup environment variable
|
|
172
172
|
# https://stackoverflow.com/questions/60169752/how-to-update-the-path-in-a-github-action-workflow-file-for-a-windows-latest-hos
|
|
173
173
|
run: |
|
|
174
174
|
Add-Content $env:GITHUB_PATH ${{ env.install_im_dir }}
|
|
175
|
+
Add-Content $env:GITHUB_PATH ${{ env.install_gs_dir }}\bin
|
|
176
|
+
- name: Install Ghostscript
|
|
177
|
+
shell: powershell
|
|
178
|
+
run: |
|
|
179
|
+
$url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10060/gs10060w64.exe"
|
|
180
|
+
$installer = "$env:TEMP\gs_installer.exe"
|
|
181
|
+
|
|
182
|
+
Write-Host "Downloading Ghostscript..."
|
|
183
|
+
Invoke-WebRequest -Uri $url -OutFile $installer
|
|
184
|
+
|
|
185
|
+
7z x $installer -o${{ env.install_gs_dir }} -y
|
|
175
186
|
- name: Uninstall bundled ImageMagick
|
|
176
187
|
# Bundled ImageMagick does not have C/C++ library and dll which required by rmagick.
|
|
188
|
+
shell: powershell
|
|
177
189
|
run: |
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
190
|
+
$regPaths = @(
|
|
191
|
+
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
|
|
192
|
+
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# Search for ImageMagick installation entry from registry
|
|
196
|
+
$target = Get-ItemProperty $regPaths -ErrorAction SilentlyContinue |
|
|
197
|
+
Where-Object { $_.DisplayName -like "*ImageMagick*" } |
|
|
198
|
+
Select-Object -First 1
|
|
199
|
+
|
|
200
|
+
if ($target) {
|
|
201
|
+
Write-Host "Found installed ImageMagick: $($target.DisplayName)"
|
|
202
|
+
|
|
203
|
+
$uninstallCommand = $target.UninstallString -replace '"', ''
|
|
204
|
+
|
|
205
|
+
if (Test-Path $uninstallCommand) {
|
|
206
|
+
Write-Host "Running uninstaller: $uninstallCommand"
|
|
207
|
+
Start-Process -FilePath $uninstallCommand -ArgumentList "/VERYSILENT", "/NORESTART" -Wait
|
|
208
|
+
Write-Host "Uninstallation completed."
|
|
209
|
+
} else {
|
|
210
|
+
Write-Error "Uninstaller file not found at: $uninstallCommand"
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
Write-Host "ImageMagick is not installed (Registry check). Skipping."
|
|
214
|
+
}
|
|
182
215
|
- name: Install ImageMagick
|
|
183
216
|
# https://github.com/rmagick/ImageMagick-binaries
|
|
184
217
|
run: |
|
|
@@ -196,3 +229,36 @@ jobs:
|
|
|
196
229
|
- name: Build and test with Rake
|
|
197
230
|
run: |
|
|
198
231
|
cmd.exe /D /S /C "bundle exec rake"
|
|
232
|
+
|
|
233
|
+
test-windows-pkgconfig:
|
|
234
|
+
runs-on: ${{ matrix.os.target }}
|
|
235
|
+
timeout-minutes: 20
|
|
236
|
+
strategy:
|
|
237
|
+
fail-fast: false
|
|
238
|
+
matrix:
|
|
239
|
+
ruby-version: ['4.0']
|
|
240
|
+
os:
|
|
241
|
+
- { target: windows-latest, arch: 'x64' }
|
|
242
|
+
- { target: windows-11-arm, arch: 'arm64' }
|
|
243
|
+
env:
|
|
244
|
+
RMAGICK_SKIP_GHOSTSCRIPT_TEST: "true" # To avoid the tedious Ghostscript setup
|
|
245
|
+
|
|
246
|
+
name: MSWin ${{ matrix.os.arch }}, Ruby ${{ matrix.ruby-version }}, MSYS2 IM
|
|
247
|
+
steps:
|
|
248
|
+
- uses: actions/checkout@v6
|
|
249
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
250
|
+
uses: ruby/setup-ruby@master
|
|
251
|
+
with:
|
|
252
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
253
|
+
bundler-cache: true
|
|
254
|
+
- name: Install ImageMagick
|
|
255
|
+
run: |
|
|
256
|
+
if ("${{ matrix.os.arch }}" -eq "arm64") {
|
|
257
|
+
$pkg = "mingw-w64-clang-aarch64-imagemagick"
|
|
258
|
+
} else {
|
|
259
|
+
$pkg = "mingw-w64-ucrt-x86_64-imagemagick"
|
|
260
|
+
}
|
|
261
|
+
ridk exec pacman -S $pkg --noconfirm
|
|
262
|
+
- name: Build and test with Rake
|
|
263
|
+
run: |
|
|
264
|
+
cmd.exe /D /S /C "bundle exec rake"
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2026-01-31 06:59:04 UTC using RuboCop version 1.84.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
10
|
-
# Configuration parameters:
|
|
11
|
-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
|
9
|
+
# Offense count: 13
|
|
10
|
+
# Configuration parameters: IgnoredGems, OnlyFor.
|
|
12
11
|
Bundler/GemComment:
|
|
13
12
|
Exclude:
|
|
14
13
|
- 'Gemfile'
|
|
15
14
|
|
|
16
15
|
# Offense count: 1
|
|
17
|
-
# Configuration parameters: Severity, Include.
|
|
18
|
-
# Include: **/*.gemspec
|
|
19
16
|
Gemspec/RequiredRubyVersion:
|
|
20
17
|
Exclude:
|
|
21
18
|
- 'rmagick.gemspec'
|
|
@@ -79,7 +76,7 @@ Layout/MultilineMethodArgumentLineBreaks:
|
|
|
79
76
|
Layout/RedundantLineBreak:
|
|
80
77
|
Enabled: false
|
|
81
78
|
|
|
82
|
-
# Offense count:
|
|
79
|
+
# Offense count: 1913
|
|
83
80
|
# This cop supports safe autocorrection (--autocorrect).
|
|
84
81
|
Layout/SingleLineBlockChain:
|
|
85
82
|
Enabled: false
|
|
@@ -120,7 +117,7 @@ Lint/ConstantDefinitionInBlock:
|
|
|
120
117
|
Exclude:
|
|
121
118
|
- 'Rakefile'
|
|
122
119
|
|
|
123
|
-
# Offense count:
|
|
120
|
+
# Offense count: 5527
|
|
124
121
|
# Configuration parameters: Only, Ignore.
|
|
125
122
|
Lint/ConstantResolution:
|
|
126
123
|
Enabled: false
|
|
@@ -206,7 +203,7 @@ Metrics/CollectionLiteralLength:
|
|
|
206
203
|
Exclude:
|
|
207
204
|
- 'doc/ex/smile.rb'
|
|
208
205
|
|
|
209
|
-
# Offense count:
|
|
206
|
+
# Offense count: 16
|
|
210
207
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
211
208
|
Metrics/CyclomaticComplexity:
|
|
212
209
|
Max: 44
|
|
@@ -271,8 +268,9 @@ Naming/MethodParameterName:
|
|
|
271
268
|
- 'lib/rvg/units.rb'
|
|
272
269
|
|
|
273
270
|
# Offense count: 2
|
|
274
|
-
# Configuration parameters: Mode, AllowedMethods.
|
|
271
|
+
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
275
272
|
# AllowedMethods: call
|
|
273
|
+
# WaywardPredicates: nonzero?
|
|
276
274
|
Naming/PredicateMethod:
|
|
277
275
|
Exclude:
|
|
278
276
|
- 'lib/rvg/deep_equal.rb'
|
|
@@ -308,6 +306,12 @@ RSpec/NoExpectationExample:
|
|
|
308
306
|
- 'spec/rmagick/image/import_pixels_spec.rb'
|
|
309
307
|
- 'spec/rmagick/image_list/write_spec.rb'
|
|
310
308
|
|
|
309
|
+
# Offense count: 1
|
|
310
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
311
|
+
RSpec/Output:
|
|
312
|
+
Exclude:
|
|
313
|
+
- 'spec/rmagick/image/liquid_rescale_spec.rb'
|
|
314
|
+
|
|
311
315
|
# Offense count: 4
|
|
312
316
|
Security/MarshalLoad:
|
|
313
317
|
Exclude:
|
|
@@ -399,7 +403,7 @@ Style/DocumentationMethod:
|
|
|
399
403
|
|
|
400
404
|
# Offense count: 4
|
|
401
405
|
# This cop supports safe autocorrection (--autocorrect).
|
|
402
|
-
# Configuration parameters: AllowedVars.
|
|
406
|
+
# Configuration parameters: AllowedVars, DefaultToNil.
|
|
403
407
|
Style/FetchEnvVar:
|
|
404
408
|
Exclude:
|
|
405
409
|
- 'ext/RMagick/extconf.rb'
|
|
@@ -411,7 +415,7 @@ Style/FetchEnvVar:
|
|
|
411
415
|
Style/FormatStringToken:
|
|
412
416
|
EnforcedStyle: unannotated
|
|
413
417
|
|
|
414
|
-
# Offense count:
|
|
418
|
+
# Offense count: 41
|
|
415
419
|
# Configuration parameters: AllowedVariables.
|
|
416
420
|
Style/GlobalVars:
|
|
417
421
|
Exclude:
|
|
@@ -459,12 +463,12 @@ Style/InvertibleUnlessCondition:
|
|
|
459
463
|
|
|
460
464
|
# Offense count: 4515
|
|
461
465
|
# This cop supports safe autocorrection (--autocorrect).
|
|
462
|
-
# Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
|
|
466
|
+
# Configuration parameters: IgnoreMacros, AllowedMethods, AllowedPatterns, IncludedMacros, IncludedMacroPatterns, AllowParenthesesInMultilineCall, AllowParenthesesInChaining, AllowParenthesesInCamelCaseMethod, AllowParenthesesInStringInterpolation, EnforcedStyle.
|
|
463
467
|
# SupportedStyles: require_parentheses, omit_parentheses
|
|
464
468
|
Style/MethodCallWithArgsParentheses:
|
|
465
469
|
Enabled: false
|
|
466
470
|
|
|
467
|
-
# Offense count:
|
|
471
|
+
# Offense count: 58
|
|
468
472
|
# This cop supports safe autocorrection (--autocorrect).
|
|
469
473
|
# Configuration parameters: EnforcedStyle.
|
|
470
474
|
# SupportedStyles: if, case, both
|
|
@@ -562,7 +566,7 @@ Style/StringHashKeys:
|
|
|
562
566
|
- 'lib/rvg/misc.rb'
|
|
563
567
|
- 'spec/rmagick/image/properties_spec.rb'
|
|
564
568
|
|
|
565
|
-
# Offense count:
|
|
569
|
+
# Offense count: 309
|
|
566
570
|
# This cop supports safe autocorrection (--autocorrect).
|
|
567
571
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
568
572
|
# SupportedStyles: single_quotes, double_quotes
|
|
@@ -584,9 +588,9 @@ Style/YodaCondition:
|
|
|
584
588
|
Style/YodaExpression:
|
|
585
589
|
Enabled: false
|
|
586
590
|
|
|
587
|
-
# Offense count:
|
|
591
|
+
# Offense count: 128
|
|
588
592
|
# This cop supports safe autocorrection (--autocorrect).
|
|
589
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes,
|
|
593
|
+
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
590
594
|
# URISchemes: http, https
|
|
591
595
|
Layout/LineLength:
|
|
592
596
|
Max: 217
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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 6.2.0
|
|
7
|
+
|
|
8
|
+
Improvements
|
|
9
|
+
|
|
10
|
+
- Support MSYS2 ImageMagick via pkg-config on Windows (#1730)
|
|
11
|
+
|
|
12
|
+
## RMagick 6.1.5
|
|
13
|
+
|
|
14
|
+
Bug Fixes
|
|
15
|
+
|
|
16
|
+
- Fix memory leak in Image#marshal_load (#1721)
|
|
17
|
+
- Fix memory leak in Image::Info#page= (#1720)
|
|
18
|
+
- Fix memory leak in Image::Info#view= with ImageMagick 7 (#1719)
|
|
19
|
+
- Fix memory leak in Image::Info#authenticate= with ImageMagick 7 (#1718)
|
|
20
|
+
- Fix memory leak in Image#marshal_load with invalid data (#1717)
|
|
21
|
+
|
|
6
22
|
## RMagick 6.1.4
|
|
7
23
|
|
|
8
24
|
Improvements
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -120,6 +120,22 @@ If you want to install ImageMagick using [Chocolatey](https://chocolatey.org/),
|
|
|
120
120
|
choco install imagemagick -PackageParameters InstallDevelopmentHeaders=true
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
### Windows (via MSYS2 / RubyInstaller)
|
|
124
|
+
|
|
125
|
+
If you are using RubyInstaller for Windows, you can easily install ImageMagick using MSYS2's `pacman` package manager.
|
|
126
|
+
Open your command prompt and run the appropriate command for your architecture to install ImageMagick:
|
|
127
|
+
|
|
128
|
+
For x64:
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
ridk exec pacman -S mingw-w64-ucrt-x86_64-imagemagick
|
|
132
|
+
```
|
|
133
|
+
For ARM64:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
ridk exec pacman -S mingw-w64-clang-aarch64-imagemagick
|
|
137
|
+
```
|
|
138
|
+
|
|
123
139
|
Installing RMagick
|
|
124
140
|
------------------
|
|
125
141
|
|
data/Rakefile
CHANGED
|
@@ -185,6 +185,14 @@ Rake::ExtensionTask.new('RMagick2') do |ext|
|
|
|
185
185
|
ext.ext_dir = 'ext/RMagick'
|
|
186
186
|
end
|
|
187
187
|
|
|
188
|
+
if RUBY_PLATFORM.include?('linux')
|
|
189
|
+
require 'ruby_memcheck'
|
|
190
|
+
require 'ruby_memcheck/rspec/rake_task'
|
|
191
|
+
namespace :spec do
|
|
192
|
+
RubyMemcheck::RSpec::RakeTask.new(valgrind: :compile)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
188
196
|
task spec: :compile
|
|
189
197
|
|
|
190
198
|
if ENV['STYLE_CHECKS']
|
data/ext/RMagick/extconf.rb
CHANGED
|
@@ -99,7 +99,7 @@ module RMagick
|
|
|
99
99
|
|
|
100
100
|
def configure_compile_options
|
|
101
101
|
# Magick-config is not available on Windows
|
|
102
|
-
if RUBY_PLATFORM.include?('mingw') # mingw
|
|
102
|
+
if RUBY_PLATFORM.include?('mingw') && !pkgconfig_exist? # mingw without pkg-config support, likely a manual installation
|
|
103
103
|
|
|
104
104
|
dir_paths = search_paths_for_windows
|
|
105
105
|
$CPPFLAGS += %( -I"#{dir_paths[:include]}")
|
|
@@ -161,6 +161,11 @@ module RMagick
|
|
|
161
161
|
@installed_im7_packages ||= detect_imagemagick_packages(IM7_PACKAGES)
|
|
162
162
|
end
|
|
163
163
|
|
|
164
|
+
def pkgconfig_exist?
|
|
165
|
+
$magick_package ||= determine_imagemagick_package
|
|
166
|
+
!!$magick_package
|
|
167
|
+
end
|
|
168
|
+
|
|
164
169
|
def determine_imagemagick_package
|
|
165
170
|
packages = [installed_im7_packages, installed_im6_packages].flatten
|
|
166
171
|
return if packages.empty?
|
|
@@ -241,16 +246,15 @@ module RMagick
|
|
|
241
246
|
Check the mkmf.log file for more detailed information.
|
|
242
247
|
END_FAILURE
|
|
243
248
|
|
|
244
|
-
if
|
|
249
|
+
if pkgconfig_exist?
|
|
250
|
+
$magick_version = PKGConfig.modversion($magick_package)[/^(\d+\.\d+\.\d+)/]
|
|
251
|
+
exit_failure failure_message unless $magick_version
|
|
252
|
+
elsif RUBY_PLATFORM.include?('mingw')
|
|
245
253
|
`#{magick_command} -version` =~ /Version: ImageMagick (\d+\.\d+\.\d+)-+\d+ /
|
|
246
254
|
$magick_version = Regexp.last_match(1)
|
|
247
255
|
exit_failure failure_message unless $magick_version
|
|
248
256
|
else
|
|
249
|
-
|
|
250
|
-
exit_failure failure_message
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
$magick_version = PKGConfig.modversion($magick_package)[/^(\d+\.\d+\.\d+)/]
|
|
257
|
+
exit_failure failure_message
|
|
254
258
|
end
|
|
255
259
|
|
|
256
260
|
# Ensure minimum ImageMagick version
|
data/ext/RMagick/rmimage.cpp
CHANGED
|
@@ -9062,14 +9062,10 @@ Image_marshal_load(VALUE self, VALUE ary)
|
|
|
9062
9062
|
{
|
|
9063
9063
|
VALUE blob, filename;
|
|
9064
9064
|
Info *info;
|
|
9065
|
-
Image *image;
|
|
9065
|
+
Image *image, *new_image;
|
|
9066
9066
|
ExceptionInfo *exception;
|
|
9067
9067
|
|
|
9068
|
-
|
|
9069
|
-
if (!info)
|
|
9070
|
-
{
|
|
9071
|
-
rb_raise(rb_eNoMemError, "not enough memory to initialize Info object");
|
|
9072
|
-
}
|
|
9068
|
+
TypedData_Get_Struct(self, Image, &rm_image_data_type, image);
|
|
9073
9069
|
|
|
9074
9070
|
filename = rb_ary_shift(ary);
|
|
9075
9071
|
blob = rb_ary_shift(ary);
|
|
@@ -9077,20 +9073,27 @@ Image_marshal_load(VALUE self, VALUE ary)
|
|
|
9077
9073
|
filename = StringValue(filename);
|
|
9078
9074
|
blob = StringValue(blob);
|
|
9079
9075
|
|
|
9076
|
+
info = CloneImageInfo(NULL);
|
|
9077
|
+
if (!info)
|
|
9078
|
+
{
|
|
9079
|
+
rb_raise(rb_eNoMemError, "not enough memory to initialize Info object");
|
|
9080
|
+
}
|
|
9081
|
+
|
|
9080
9082
|
exception = AcquireExceptionInfo();
|
|
9081
9083
|
if (filename != Qnil)
|
|
9082
9084
|
{
|
|
9083
9085
|
strlcpy(info->filename, RSTRING_PTR(filename), sizeof(info->filename));
|
|
9084
9086
|
}
|
|
9085
9087
|
GVL_STRUCT_TYPE(BlobToImage) args = { info, RSTRING_PTR(blob), (size_t)RSTRING_LEN(blob), exception };
|
|
9086
|
-
|
|
9088
|
+
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(BlobToImage), &args);
|
|
9087
9089
|
|
|
9088
9090
|
// Destroy info before raising an exception
|
|
9089
9091
|
DestroyImageInfo(info);
|
|
9090
9092
|
CHECK_EXCEPTION();
|
|
9091
9093
|
DestroyExceptionInfo(exception);
|
|
9092
9094
|
|
|
9093
|
-
UPDATE_DATA_PTR(self,
|
|
9095
|
+
UPDATE_DATA_PTR(self, new_image);
|
|
9096
|
+
rm_image_destroy(image);
|
|
9094
9097
|
|
|
9095
9098
|
return self;
|
|
9096
9099
|
}
|
data/ext/RMagick/rminfo.cpp
CHANGED
|
@@ -446,7 +446,7 @@ Info_authenticate_eq(VALUE self, VALUE passwd_arg)
|
|
|
446
446
|
}
|
|
447
447
|
else
|
|
448
448
|
{
|
|
449
|
-
|
|
449
|
+
DeleteImageOption(info, "authenticate");
|
|
450
450
|
}
|
|
451
451
|
#else
|
|
452
452
|
if (info->authenticate)
|
|
@@ -1750,6 +1750,8 @@ Info_page_eq(VALUE self, VALUE page_arg)
|
|
|
1750
1750
|
info->page = NULL;
|
|
1751
1751
|
return page_arg;
|
|
1752
1752
|
}
|
|
1753
|
+
magick_free(info->page);
|
|
1754
|
+
|
|
1753
1755
|
info->page = geometry;
|
|
1754
1756
|
|
|
1755
1757
|
RB_GC_GUARD(geom_str);
|
|
@@ -2292,7 +2294,7 @@ Info_view_eq(VALUE self, VALUE view_arg)
|
|
|
2292
2294
|
}
|
|
2293
2295
|
else
|
|
2294
2296
|
{
|
|
2295
|
-
|
|
2297
|
+
DeleteImageOption(info, "fpx:view");
|
|
2296
2298
|
}
|
|
2297
2299
|
#else
|
|
2298
2300
|
if (info->view)
|
data/lib/rmagick/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rmagick
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Hunter
|
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
158
|
version: '0'
|
|
159
159
|
requirements:
|
|
160
160
|
- ImageMagick 6.8.9 or later
|
|
161
|
-
rubygems_version:
|
|
161
|
+
rubygems_version: 4.0.6
|
|
162
162
|
specification_version: 4
|
|
163
163
|
summary: Ruby binding to ImageMagick
|
|
164
164
|
test_files: []
|