jekyll_picture_tag 2.1.0 → 2.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 112ac65fbe4fb0b25934864d20de4e840259aa7bac0b43c8d6724d3d0c1ded7d
4
- data.tar.gz: 8d6d101b1849762e3e955c80b301049a3cab5d7bea6f9ad8469521fb8e7fe60c
3
+ metadata.gz: 30a2a1abb695fc9b9478a3b5a89d9d04fcac60bc2f26be01e75ab8bd986ca066
4
+ data.tar.gz: 790b247444046c015fcb64e791b5ae63bc861e7fa94ef471bcda730912cf30ac
5
5
  SHA512:
6
- metadata.gz: 86c1e2e9f9e8f62fbbc1ae69975ac490f40358649725b6308c9b964ce29571bbdaef22c6f3a0036e8c3d6352bd799d3b05db080914b143283ba97d61282632d6
7
- data.tar.gz: 17cf9d9e1d397651148191fd2c3d9cde68f2af59c17edabb18b9fb27ebba9ea534a42936f601bb999944d2ff884e09788e6301494896a2ceeae0c2d1b9c23aae
6
+ metadata.gz: 8a189f75d899129943f345cc002c2513f82845725b9de682dc17d6ff4e7db157647743ad09ca0bbba66ff1650e41a38b9f066c6523bf929b73f1cba6e2f3bcde
7
+ data.tar.gz: 7118cd37ec049eb909147ad17d8a43e37181aa36f38f76f2a7f9fcb542b6d5a79926a4a8d2e6f2e78e80e789845a41fa5f16508d572e50c26eacc87d0d31450e
@@ -2,6 +2,9 @@
2
2
  ---
3
3
  # Release History
4
4
 
5
+ * 2.1.1 20 July, 2024
6
+ * Don't provide Q setting for PPM images - thanks to @dichiban for [#309](https://github.com/rbuchberger/jekyll_picture_tag/pull/309)
7
+ * Fix alpha premultiplication - thanks to @KaarlisCaune for [#302](https://github.com/rbuchberger/jekyll_picture_tag/pull/302)
5
8
  * 2.1.0 29 January, 2024
6
9
  * Check whether the vips CLI is installed before trying to use it. Thanks to @philrb for
7
10
  [#299](https://github.com/rbuchberger/jekyll_picture_tag/pull/299)
@@ -1,5 +1,5 @@
1
1
  # HTML attributes
2
2
 
3
3
  Jekyll Picture Tag has comprehensive attribute support for all generated HTML. You can add
4
- attributes both through the [liquid tag]({{ site.baseurl }}{% link /users/liquid_tag/index.md %}),
5
- and the [preset]({{ site.baseurl }}{% link /usage/users/presets/html_attributes.md %}) (scroll down a bit).
4
+ attributes both through the [liquid tag](../liquid_tag/index.md),
5
+ and the [preset](../presets/html_attributes.md) (scroll down a bit).
@@ -57,9 +57,9 @@ module PictureTag
57
57
 
58
58
  opts[:strip] = PictureTag.preset['strip_metadata']
59
59
 
60
- # gifs don't accept a quality setting, and PNGs don't on older versions of
60
+ # gifs don't accept a quality setting, and PNGs and PPMs don't on older versions of
61
61
  # vips. Since it's not remarkably useful anyway, we'll ignore them.
62
- opts[quality_key] = base.quality unless %w[gif png].include? base.format
62
+ opts[quality_key] = base.quality unless %w[gif png ppm].include? base.format
63
63
 
64
64
  opts.transform_keys(&:to_sym)
65
65
  end
@@ -86,7 +86,13 @@ module PictureTag
86
86
  end
87
87
 
88
88
  def resize(image)
89
- image.resize(scale_value)
89
+ if image.has_alpha?
90
+ image = image.premultiply
91
+ image = image.resize(scale_value)
92
+ image.unpremultiply
93
+ else
94
+ image.resize(scale_value)
95
+ end
90
96
  end
91
97
 
92
98
  def crop(image)
@@ -1,3 +1,3 @@
1
1
  module PictureTag
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.1.1'.freeze
3
3
  end
data/readme.md CHANGED
@@ -59,6 +59,9 @@ Tag is your responsive images minion - give it simple instructions and it'll han
59
59
 
60
60
  Recent releases:
61
61
 
62
+ * 2.1.1 20 July, 2024
63
+ * Don't provide Q setting for PPM images - thanks to @dichiban for [#309](https://github.com/rbuchberger/jekyll_picture_tag/pull/309)
64
+ * Fix alpha premultiplication - thanks to @KaarlisCaune for [#302](https://github.com/rbuchberger/jekyll_picture_tag/pull/302)
62
65
  * 2.1.0 29 January, 2024
63
66
  * Check whether the vips CLI is installed before trying to use it. Thanks to @philrb for
64
67
  [#299](https://github.com/rbuchberger/jekyll_picture_tag/pull/299)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_picture_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Wierzbowski
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-01-29 00:00:00.000000000 Z
13
+ date: 2024-07-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable