mpngquant 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/mpngquant.rb +11 -0
- data/lib/mpngquant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c99d5838e35276dfc56e7c5b7cfd94c5445bf245e31ea83d61b2fbf0b7edb01
|
4
|
+
data.tar.gz: 8f97956148df4fbba498f966fdf2c9df85cb5eae36251359026de0b45c42dbec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0392d35a2a3200e05d89885b88dfa4c7baf1688e2ee1ed0b2b7f1a05692495563ac835b66807070913aab458ea1d392077ad73ecea5950c974b20b1deb1d7c9
|
7
|
+
data.tar.gz: d422da678b8d0594a6b3ddfb4e5e8b39fbcf34adb8c4be26fa59f88229736076a9bc00342ab5c98c2371e669456318a68e47c8431c23e992183b41a1539056ca
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mpngquant (0.
|
4
|
+
mpngquant (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -9,12 +9,12 @@ GEM
|
|
9
9
|
ast (2.4.2)
|
10
10
|
diff-lcs (1.4.4)
|
11
11
|
parallel (1.20.1)
|
12
|
-
parser (3.0.
|
12
|
+
parser (3.0.1.0)
|
13
13
|
ast (~> 2.4.1)
|
14
14
|
rainbow (3.0.0)
|
15
15
|
rake (12.3.3)
|
16
16
|
regexp_parser (2.1.1)
|
17
|
-
rexml (3.2.
|
17
|
+
rexml (3.2.5)
|
18
18
|
rspec (3.10.0)
|
19
19
|
rspec-core (~> 3.10.0)
|
20
20
|
rspec-expectations (~> 3.10.0)
|
data/lib/mpngquant.rb
CHANGED
@@ -7,6 +7,17 @@ module Mpngquant
|
|
7
7
|
|
8
8
|
class Pngquant
|
9
9
|
class << self
|
10
|
+
# Whether pngquant exists or not?
|
11
|
+
# @return [True] "pngquant" exists,
|
12
|
+
# [False] "pngquant" NOT exists
|
13
|
+
def supported?
|
14
|
+
args = ["pngquant", "--version"]
|
15
|
+
_, s = Open3.capture2(*args)
|
16
|
+
s
|
17
|
+
rescue Errno::ENOENT
|
18
|
+
false
|
19
|
+
end
|
20
|
+
|
10
21
|
def optimize(infile:, force: nil, skip_if_larger: nil,
|
11
22
|
ext: nil, quality: nil, speed: nil, nofs: nil,
|
12
23
|
posterize: nil, strip: nil, verbose: nil)
|
data/lib/mpngquant/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mpngquant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FUNABARA Masao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standardrb
|