image_processing 1.10.3 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of image_processing might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/image_processing/mini_magick.rb +11 -2
- data/lib/image_processing/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e463ca2dcdc1e674b551a94acdfa2495677dd4fd17a79cbaf351727700cddf6
|
4
|
+
data.tar.gz: 7970e3a7d1d8d70ab3291f7c3e892f1b2ebff9181bb74cc2ff4b1f36f9b39b80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a19939f654334cde66d3ae6c8bb451d1152a1f7e8385507b9649e88b151e99ed6c9005ed861e43c2d9c836327d93699685d74196b92c4b81e38c5d94abe545e5
|
7
|
+
data.tar.gz: 292f1463f86eae88987dcc2dbe8d8e60ec458f9c33c41c1e1349a5dbadea12ba730ffde697158e239e64c28c14d0d14dc0c617ee439fe7380e73f0135dfecfd7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.11.0 (2020-05-17)
|
2
|
+
|
3
|
+
* [minimagick] Handle destination format having no file extension (@janko)
|
4
|
+
|
5
|
+
* [minimagick] Disable sharpening on `#resize_*` operators by default (@flori)
|
6
|
+
|
7
|
+
* [minimagick] Add `#crop` which accepts `left, top, width, height` arguments (@janko)
|
8
|
+
|
1
9
|
## 1.10.3 (2020-01-12)
|
2
10
|
|
3
11
|
* [vips] Fix auto-rotation not working in certain cases on libvips 8.9.0 (@janko)
|
@@ -86,6 +86,15 @@ module ImageProcessing
|
|
86
86
|
magick.extent "#{width}x#{height}"
|
87
87
|
end
|
88
88
|
|
89
|
+
# Crops the image with the specified crop points.
|
90
|
+
def crop(*args)
|
91
|
+
case args.count
|
92
|
+
when 1 then magick.crop(*args)
|
93
|
+
when 4 then magick.crop("#{args[2]}x#{args[3]}+#{args[0]}+#{args[1]}")
|
94
|
+
else fail ArgumentError, "wrong number of arguments (expected 1 or 4, got #{args.count})"
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
89
98
|
# Rotates the image by an arbitrary angle. For angles that are not
|
90
99
|
# multiple of 90 degrees an optional background color can be specified to
|
91
100
|
# fill in the gaps.
|
@@ -161,7 +170,7 @@ module ImageProcessing
|
|
161
170
|
|
162
171
|
# Resizes the image using the specified geometry, and sharpens the
|
163
172
|
# resulting thumbnail.
|
164
|
-
def thumbnail(geometry, sharpen:
|
173
|
+
def thumbnail(geometry, sharpen: nil)
|
165
174
|
magick.resize(geometry)
|
166
175
|
|
167
176
|
if sharpen
|
@@ -192,7 +201,7 @@ module ImageProcessing
|
|
192
201
|
# format, ImageMagick will create multiple images, one for each layer.
|
193
202
|
# We want to warn the user that this is probably not what they wanted.
|
194
203
|
def disallow_split_layers!(destination_path)
|
195
|
-
layers = Dir[destination_path.sub(
|
204
|
+
layers = Dir[destination_path.sub(/(\.\w+)?$/, '-*\0')]
|
196
205
|
|
197
206
|
if layers.any?
|
198
207
|
layers.each { |path| File.delete(path) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_processing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
|
-
rubygems_version: 3.1.
|
162
|
+
rubygems_version: 3.1.1
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: High-level wrapper for processing images for the web with ImageMagick or
|