jekyll-webp-resize 1.0.6 → 1.0.7

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
  SHA1:
3
- metadata.gz: 3e29312d6b9c70ffe5a5c804d7cedb9a90192430
4
- data.tar.gz: 5c61ee26c770716fb9a273330d2998aca7b3ff20
3
+ metadata.gz: c410462c41e16f2b09bbcc16124b477b89f45cbc
4
+ data.tar.gz: a0a7a09010f09de21d48906c9d56be254661f693
5
5
  SHA512:
6
- metadata.gz: 6ff5e320e9fae957dce08b6e68b729ea987d5b3f03961d4d600123be5c3ba2a94b284dc9a9488fc635b53e2eda6ec1875f290e188cd03cbd61d44ee145e8c670
7
- data.tar.gz: f2ca6c8ab116dc68db4ea08e5d5dfe485b633d6e7f84fa9d48ca4f9c339f1028f35e0f57ab01090488437a4fc6734bb2e79e8d11b5bb92b8f4192a7a4bab5710
6
+ metadata.gz: 56dee0e8ccb7b5ae2ec89ec0f5e15c304ec3be1cc38998c289ba4236a2663b0ab4dc9fd9d8fd13681985a22e525e05abdba90af1e9f45e1b0aa3a48b9b5e67dd
7
+ data.tar.gz: 882a132ab344eb28f419a7ed1d312ff83bc80f9ad647f6251dce6b44160128fea1fc80b90c53f9193fe08627359d303d1f4e8721bbb197eb98f041bcec86be6a
@@ -1,6 +1,6 @@
1
1
  module Jekyll
2
2
  module Webp
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.7"
4
4
  # When modifying remember to issue a new tag command in git before committing, then push the new tag
5
5
  # git tag -a v0.1.0 -m "Gem v0.1.0"
6
6
  # git push origin --tags
@@ -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 = "\"#{full_path}\" -quiet -mt #{flags} \"#{input_file}\" "
49
+ cmd = "convert #{flags} \"#{input_file}\" "
50
50
  if size != 0
51
- if width > height
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 += "-o \"#{output_file}\""
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 92% "
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 += " #{new_output_file}"
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.6
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-01 00:00:00.000000000 Z
12
+ date: 2017-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll