jekyll-webp-resize 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-webp-resize/version.rb +1 -1
- data/lib/jekyll-webp-resize/webpExec.rb +7 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c410462c41e16f2b09bbcc16124b477b89f45cbc
|
4
|
+
data.tar.gz: a0a7a09010f09de21d48906c9d56be254661f693
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56dee0e8ccb7b5ae2ec89ec0f5e15c304ec3be1cc38998c289ba4236a2663b0ab4dc9fd9d8fd13681985a22e525e05abdba90af1e9f45e1b0aa3a48b9b5e67dd
|
7
|
+
data.tar.gz: 882a132ab344eb28f419a7ed1d312ff83bc80f9ad647f6251dce6b44160128fea1fc80b90c53f9193fe08627359d303d1f4e8721bbb197eb98f041bcec86be6a
|
@@ -46,26 +46,23 @@ module Jekyll
|
|
46
46
|
|
47
47
|
Jekyll.logger.info("Webp:", "Generating #{output_file}")
|
48
48
|
# Construct the full program call
|
49
|
-
cmd = "
|
49
|
+
cmd = "convert #{flags} \"#{input_file}\" "
|
50
50
|
if size != 0
|
51
|
-
|
52
|
-
cmd += "-resize #{size.to_s} 0 "
|
53
|
-
else
|
54
|
-
cmd += "-resize 0 #{size.to_s} "
|
55
|
-
end
|
51
|
+
cmd += "-filter Lanczos -resize \"#{size.to_s}>\" "
|
56
52
|
end
|
57
|
-
cmd += "
|
53
|
+
cmd += "\"#{output_file}\""
|
54
|
+
Jekyll.logger.info(cmd)
|
58
55
|
|
59
56
|
run_cmd(cmd)
|
60
57
|
extension = File.extname(output_file)
|
61
58
|
basename = File.basename(output_file, extension)
|
62
59
|
path = File.dirname(output_file)
|
63
60
|
new_output_file = path + "/" + basename + ".jpg"
|
64
|
-
cmd = "convert \"#{input_file}\" -quality
|
61
|
+
cmd = "convert \"#{input_file}\" -quality 94% -define jpeg:dct-method=float -strip -interlace Plane "
|
65
62
|
if size != 0
|
66
|
-
cmd += "-resize \"#{size.to_s}>\" "
|
63
|
+
cmd += "-filter Lanczos -resize \"#{size.to_s}>\" "
|
67
64
|
end
|
68
|
-
cmd += "
|
65
|
+
cmd += "\"#{new_output_file}\""
|
69
66
|
Jekyll.logger.info(cmd)
|
70
67
|
run_cmd(cmd)
|
71
68
|
end #function run
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-webp-resize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sverrir Sigmundarson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-12-
|
12
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|