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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75355bb0e91b8fc13874a7c196526c0e4e658e046f4192641c9e3fb4dae49033
4
- data.tar.gz: 2771e8e03277bc8b152641698e44cb8e7baa5428bdc67f0af2d86a201078f0d8
3
+ metadata.gz: 7e463ca2dcdc1e674b551a94acdfa2495677dd4fd17a79cbaf351727700cddf6
4
+ data.tar.gz: 7970e3a7d1d8d70ab3291f7c3e892f1b2ebff9181bb74cc2ff4b1f36f9b39b80
5
5
  SHA512:
6
- metadata.gz: 4dc6c6d07b03e6f51f1c829c72a7d42958617e1ab8614bb8238f6c56073a95b2408340c7d54f54ee0089d13cea8e2f10ec90e215e73eff022cf37b4a9c10e95c
7
- data.tar.gz: 3d0a3ddb0215cf989fb694564f74112efc3c895a9f41f851dc506b32ecaa749e6fe2845bf688e67171e34687fcdd11a9d7a1caaa39a462cfaeb03003196e0a77
6
+ metadata.gz: a19939f654334cde66d3ae6c8bb451d1152a1f7e8385507b9649e88b151e99ed6c9005ed861e43c2d9c836327d93699685d74196b92c4b81e38c5d94abe545e5
7
+ data.tar.gz: 292f1463f86eae88987dcc2dbe8d8e60ec458f9c33c41c1e1349a5dbadea12ba730ffde697158e239e64c28c14d0d14dc0c617ee439fe7380e73f0135dfecfd7
@@ -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(/\.\w+$/, '-*\0')]
204
+ layers = Dir[destination_path.sub(/(\.\w+)?$/, '-*\0')]
196
205
 
197
206
  if layers.any?
198
207
  layers.each { |path| File.delete(path) }
@@ -1,3 +1,3 @@
1
1
  module ImageProcessing
2
- VERSION = "1.10.3"
2
+ VERSION = "1.11.0"
3
3
  end
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.10.3
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-01-12 00:00:00.000000000 Z
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.2
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