image_processing 1.10.0 → 1.10.1
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 +4 -0
- data/README.md +3 -3
- data/image_processing.gemspec +1 -1
- data/lib/image_processing/version.rb +1 -1
- data/lib/image_processing/vips.rb +5 -9
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5141a7684e311666d6a8a91bf74cd791757df4bafe8b989f42c4785aa7bd2bf
|
4
|
+
data.tar.gz: 2639145e388bf411cbf03559151c12a5eec8757e96b6bd52ae993533e7559781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa03273ffdb5d53a8cd944921db4e6359fb198e308373a15618c4c824cbe981e41c40544f7b64f1008175de30d2ea60f92cfb346564f1d4166e164d27759c4af
|
7
|
+
data.tar.gz: febc2324ceccb4b0fca18c708ad3c2423239fa458065cb74790a574e8149acc6285709d356eb99ec2896611803cc536707b47c1b3b3c68b3067377fb881dffb0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -42,9 +42,9 @@ how to resize and process images.
|
|
42
42
|
|
43
43
|
## Usage
|
44
44
|
|
45
|
-
Processing is performed through [`ImageProcessing::Vips`] or
|
46
|
-
[`ImageProcessing::MiniMagick`] modules. Both modules share the same
|
47
|
-
API for defining the processing pipeline:
|
45
|
+
Processing is performed through **[`ImageProcessing::Vips`]** or
|
46
|
+
**[`ImageProcessing::MiniMagick`]** modules. Both modules share the same
|
47
|
+
chainable API for defining the processing pipeline:
|
48
48
|
|
49
49
|
```rb
|
50
50
|
require "image_processing/mini_magick"
|
data/image_processing.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
19
|
spec.add_dependency "mini_magick", ">= 4.9.5", "< 5"
|
20
|
-
spec.add_dependency "ruby-vips", ">= 2.0.
|
20
|
+
spec.add_dependency "ruby-vips", ">= 2.0.17", "< 3"
|
21
21
|
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
spec.add_development_dependency "minitest", "~> 5.8"
|
@@ -54,7 +54,7 @@ module ImageProcessing
|
|
54
54
|
# pipeline defined in the Vips::Image object. Accepts additional
|
55
55
|
# saver-specific options (e.g. quality).
|
56
56
|
def self.save_image(image, path, saver: nil, quality: nil, **options)
|
57
|
-
options =
|
57
|
+
options[:Q] = quality if quality
|
58
58
|
|
59
59
|
if saver
|
60
60
|
image.public_send(:"#{saver}save", path, **options)
|
@@ -187,15 +187,11 @@ module ImageProcessing
|
|
187
187
|
# output image format. Each of these loaders and savers accept slightly
|
188
188
|
# different options, so to allow the user to be able to specify options
|
189
189
|
# for a specific loader/saver and have it ignored for other
|
190
|
-
# loaders/savers, we do
|
191
|
-
#
|
190
|
+
# loaders/savers, we do some introspection and filter out options that
|
191
|
+
# don't exist for a particular loader or saver.
|
192
192
|
def select_valid_options(operation_name, options)
|
193
|
-
|
194
|
-
|
195
|
-
operation_options = operation.get_construct_args
|
196
|
-
.select { |name, flags| (flags & ::Vips::ARGUMENT_INPUT) != 0 }
|
197
|
-
.select { |name, flags| (flags & ::Vips::ARGUMENT_REQUIRED) == 0 }
|
198
|
-
.map(&:first).map(&:to_sym)
|
193
|
+
introspect = ::Vips::Introspect.get(operation_name)
|
194
|
+
operation_options = introspect.optional_input.keys.map(&:to_sym)
|
199
195
|
|
200
196
|
options.select { |name, value| operation_options.include?(name) }
|
201
197
|
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.
|
4
|
+
version: 1.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Janko Marohnić
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 2.0.
|
39
|
+
version: 2.0.17
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '3'
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 2.0.
|
49
|
+
version: 2.0.17
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '3'
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.1.
|
161
|
+
rubygems_version: 3.1.2
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Set of higher-level helper methods for image processing.
|