vitals_image 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39aa736f9e99bbf581d7e5b2f27df977921428c7aaf95846189475fd5ecc28ca
4
- data.tar.gz: e879218f0859db14a8879ef761b88930758e73302d9b1e0e88e4fb7c7e3251a6
3
+ metadata.gz: 7c75ba4087e4d7a4028c7264bb3aa2fe3a5084eb1f627714d58e468f3a999289
4
+ data.tar.gz: 625fe4c2c4462b749b0c841e218461c7740e633e054a2f269b9b34f41b5fde04
5
5
  SHA512:
6
- metadata.gz: e6a8f4819b849d25306338f00a3a3691e59acbe12417cfb88b5c5a722914b1d34bdfb792776e51a22f7d4efbed37030f8c35203ca8d4a362e8c0e4213d5776fa
7
- data.tar.gz: 5058ad30a14d2edcb8ac744e5d8bb8130c66e0e874a3c088fb15ac297ba5911b8f9e95b19f7f67dbceb8f1a46201a2ed8f56c4b2e9271d7d19ad79476d637bab
6
+ metadata.gz: b8042b6efa3d6c6164a62a4ccc6b576a9993525f8efbbd8e19ad0a1fa7ac6d15d28c0e68e5604ae22823c6a39266747c3180f72350bce97889c3a3a228f8c02c
7
+ data.tar.gz: fb2a462820d0228734fef483bee2beefefab5065556a8e916c37493c9ffe651c442b21cd193f82375b59e2c19b72bd702a9d91abc10c636fbcac90cc5f2f6904
data/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2021-05-22
4
+
5
+ - Do not attempt to transform invariable images
6
+
3
7
  ## [0.2.0] - 2021-05-18
4
8
 
5
- - Use the `optimial_quality` value of blob metadata instead of fixed `85` if its available;
9
+ - Use the `optimal_quality` value of blob metadata instead of fixed `85` if its available;
6
10
  - Remove some unecessary configs;
7
11
  - Drop analyzers and use `active_analysis` gem instead;
8
12
  - Use "retry once" strategy instead of `create_or_find_by`;
data/README.md CHANGED
@@ -135,15 +135,28 @@ The following configuration options are available. The defaults were chosen for
135
135
  | png_optimization | see below | see below | Hash of options to pass to active storage when optimizing a PNG. |
136
136
  | active_storage_route | `:inherited` | `:inherited` | Defines how urls of active storage images will be generated. If `inherited` it will use the same as active storage. Other valid options are `redirect`, `proxy` and `public`. Whatever is set here can be overriden in the helper. |
137
137
 
138
+ Minimagick
138
139
  ```ruby
139
140
  # jpeg_conversion
140
- { sampling_factor: "4:2:0", strip: true, interlace: "JPEG", colorspace: "sRGB", quality: 85, format: "jpg", background: :white, flatten: true, alpha: :off }
141
+ { saver: { strip: true, quality: 85, interlace: "JPEG", sampling_factor: "4:2:0", colorspace: "sRGB", background: :white, flatten: true, alpha: :off }, format: "jpg" }
141
142
 
142
143
  # jpeg_optimization:
143
- { sampling_factor: "4:2:0", strip: true, interlace: "JPEG", colorspace: "sRGB", quality: 85 }
144
+ { saver: { strip: true, quality: 85, interlace: "JPEG", sampling_factor: "4:2:0", colorspace: "sRGB" } }
144
145
 
145
146
  # png_optimization:
146
- { strip: true, quality: 00 }
147
+ { saver: { strip: true, quality: 00 } }
148
+ ```
149
+
150
+ Vips
151
+ ```ruby
152
+ # jpeg_conversion
153
+ { saver: { strip: true, quality: 85, interlace: true, optimize_coding: true, trellis_quant: true, quant_table: 3, background: 255 }, format: "jpg" }
154
+
155
+ # jpeg_optimization:
156
+ { saver: { strip: true, quality: 85, interlace: true, optimize_coding: true, trellis_quant: true, quant_table: 3 } }
157
+
158
+ # png_optimization:
159
+ { saver: { strip: true, compression: 9 } }
147
160
  ```
148
161
 
149
162
  These can be configured in your environment files, just like any other rails settings:
@@ -9,7 +9,7 @@ module VitalsImage
9
9
  module VERSION
10
10
  MAJOR = 0
11
11
  MINOR = 2
12
- TINY = 0
12
+ TINY = 1
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -7,7 +7,7 @@ module VitalsImage
7
7
  end
8
8
 
9
9
  def variable?
10
- true
10
+ @source.variable?
11
11
  end
12
12
 
13
13
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vitals_image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Breno Gazzola
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-18 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob