jekyll-favicon-generator 0.1.0 → 0.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 +4 -4
- data/lib/jekyll-favicon-generator/ico.rb +6 -4
- data/lib/jekyll-favicon-generator/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cc4cea4a7b8072bb686d46a65e15ff158fada769c93cee34bd771cf87ed3fb4
|
4
|
+
data.tar.gz: 269990813ad13c3a5ff3f563ee21e21a8c354ecf1fee55b30951bca6a241aab9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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] }
|
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 }
|
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
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
132
|
+
rubygems_version: 3.3.26
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Favicon generator for Jekyll.
|