jekyll-favicon-generator 0.1.0 → 0.1.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: 24b3fb7b124c03e2d0d939905a0552466982346dce15bb6e354d40060ae446c3
4
- data.tar.gz: 912d66b372081c250437f18c8d73f9310965171c0d0415573b887534d9a502a0
3
+ metadata.gz: 4cc4cea4a7b8072bb686d46a65e15ff158fada769c93cee34bd771cf87ed3fb4
4
+ data.tar.gz: 269990813ad13c3a5ff3f563ee21e21a8c354ecf1fee55b30951bca6a241aab9
5
5
  SHA512:
6
- metadata.gz: 96127209a335b1bee8edd0ef228e74ace1aa2914b7a51ff118e32f76ac380261a81baf6a9f64c8e774c136929a4b4354b2cc1984c795bab8d1dbac8e2549f4e5
7
- data.tar.gz: 41eba8d3dccbe4f2fe2f6b399d0650436e9b46757dc655d40b1cd4f3a3aacfc65b8ab0a46083b010676c8179fd62d816879811d1bcc6982517505ebc96fd86ce
6
+ metadata.gz: b4910a8768348051763a58287f9e2047ba65d60c5e8925be765157f1165cd9882bedbd1b872301fb3293c04e8dffeb6b9bfa71403e21d65fbc0aa0aaaed1248a
7
+ data.tar.gz: 2f40ab0bf0557747983cf4c96397efe1fe6d85f02a5b8bd6e9f0c0be73e0f9053f0134d954ff74f91e941bc78a921216cc201ffd5b77a1cdb1f881234461454b
@@ -43,7 +43,7 @@ module JekyllFaviconGenerator
43
43
  # Generate the ICONDIR structure for the ICO file
44
44
  def icon_dir(sizes)
45
45
  count = sizes.length
46
- offset = IconDir.round_byte_length + count * IconDirEntry.round_byte_length
46
+ offset = IconDir.round_byte_length + (count * IconDirEntry.round_byte_length)
47
47
 
48
48
  dir = IconDir.new.tap do |id|
49
49
  id.type = 1 # 1 => ICO
@@ -62,7 +62,7 @@ module JekyllFaviconGenerator
62
62
  def icon_dir_entry(size, offset)
63
63
  xor_rowsize = rowsize size * BPP_COUNT
64
64
  and_rowsize = rowsize size
65
- bytes = BitMapInfoHeader.round_byte_length + xor_rowsize * size + and_rowsize * size
65
+ bytes = BitMapInfoHeader.round_byte_length + (xor_rowsize * size) + (and_rowsize * size)
66
66
 
67
67
  IconDirEntry.new.tap do |ide|
68
68
  ide.width = size
@@ -93,7 +93,8 @@ module JekyllFaviconGenerator
93
93
  arr = img.to_enum.map do |row|
94
94
  # Colors are stored in ARGB format with LE order, so BGRA in the array
95
95
  # Also pad rows to the required size
96
- row.map { |r, g, b, a| [b, g, r, a] }.fill([0, 0, 0, 0], row.length..(xor_rowsize / 4 - 1))
96
+ row.map { |r, g, b, a| [b, g, r, a] }
97
+ .fill([0, 0, 0, 0], row.length..((xor_rowsize / 4) - 1))
97
98
  end
98
99
  arr.flatten.pack("C*")
99
100
  end
@@ -102,7 +103,8 @@ module JekyllFaviconGenerator
102
103
  and_rowsize = rowsize width
103
104
  arr = img.to_enum.map do |row|
104
105
  # Convert alpha to 1-bit and pad rows to the required size
105
- row.map { |_r, _g, _b, a| a.zero? && 1 || 0 }.fill(0, row.length..(and_rowsize * BYTE - 1))
106
+ row.map { |_r, _g, _b, a| (a.zero? && 1) || 0 }
107
+ .fill(0, row.length..((and_rowsize * BYTE) - 1))
106
108
  end
107
109
  [arr.flatten.join].pack("B*")
108
110
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllFaviconGenerator
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-favicon-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Jansen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-13 00:00:00.000000000 Z
11
+ date: 2023-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bit-struct
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.2'
81
+ version: '0.3'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.2'
88
+ version: '0.3'
89
89
  description: A simple and fast Jekyll plugin to generate favicons from a single source
90
90
  image.
91
91
  email:
@@ -122,14 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: 2.6.0
125
+ version: 2.7.0
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.3.15
132
+ rubygems_version: 3.3.26
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Favicon generator for Jekyll.