openstreetmap-image_optim 0.21.0.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 +7 -0
- data/.gitignore +17 -0
- data/.rubocop.yml +65 -0
- data/.travis.yml +42 -0
- data/CHANGELOG.markdown +272 -0
- data/CONTRIBUTING.markdown +10 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +344 -0
- data/Vagrantfile +33 -0
- data/bin/image_optim +28 -0
- data/image_optim.gemspec +29 -0
- data/lib/image_optim.rb +228 -0
- data/lib/image_optim/bin_resolver.rb +144 -0
- data/lib/image_optim/bin_resolver/bin.rb +105 -0
- data/lib/image_optim/bin_resolver/comparable_condition.rb +60 -0
- data/lib/image_optim/bin_resolver/error.rb +6 -0
- data/lib/image_optim/bin_resolver/simple_version.rb +31 -0
- data/lib/image_optim/cmd.rb +49 -0
- data/lib/image_optim/config.rb +205 -0
- data/lib/image_optim/configuration_error.rb +3 -0
- data/lib/image_optim/handler.rb +57 -0
- data/lib/image_optim/hash_helpers.rb +45 -0
- data/lib/image_optim/image_meta.rb +25 -0
- data/lib/image_optim/image_path.rb +68 -0
- data/lib/image_optim/non_negative_integer_range.rb +11 -0
- data/lib/image_optim/option_definition.rb +32 -0
- data/lib/image_optim/option_helpers.rb +17 -0
- data/lib/image_optim/railtie.rb +38 -0
- data/lib/image_optim/runner.rb +139 -0
- data/lib/image_optim/runner/glob_helpers.rb +45 -0
- data/lib/image_optim/runner/option_parser.rb +227 -0
- data/lib/image_optim/space.rb +29 -0
- data/lib/image_optim/true_false_nil.rb +16 -0
- data/lib/image_optim/worker.rb +159 -0
- data/lib/image_optim/worker/advpng.rb +35 -0
- data/lib/image_optim/worker/class_methods.rb +91 -0
- data/lib/image_optim/worker/gifsicle.rb +63 -0
- data/lib/image_optim/worker/jhead.rb +43 -0
- data/lib/image_optim/worker/jpegoptim.rb +58 -0
- data/lib/image_optim/worker/jpegrecompress.rb +44 -0
- data/lib/image_optim/worker/jpegtran.rb +46 -0
- data/lib/image_optim/worker/optipng.rb +45 -0
- data/lib/image_optim/worker/pngcrush.rb +54 -0
- data/lib/image_optim/worker/pngout.rb +38 -0
- data/lib/image_optim/worker/pngquant.rb +51 -0
- data/lib/image_optim/worker/svgo.rb +32 -0
- data/script/template/jquery-2.1.3.min.js +4 -0
- data/script/template/sortable-0.6.0.min.js +2 -0
- data/script/template/worker_analysis.erb +254 -0
- data/script/update_worker_options_in_readme +60 -0
- data/script/worker_analysis +599 -0
- data/spec/image_optim/bin_resolver/comparable_condition_spec.rb +37 -0
- data/spec/image_optim/bin_resolver/simple_version_spec.rb +57 -0
- data/spec/image_optim/bin_resolver_spec.rb +272 -0
- data/spec/image_optim/cmd_spec.rb +66 -0
- data/spec/image_optim/config_spec.rb +217 -0
- data/spec/image_optim/handler_spec.rb +95 -0
- data/spec/image_optim/hash_helpers_spec.rb +76 -0
- data/spec/image_optim/image_path_spec.rb +54 -0
- data/spec/image_optim/railtie_spec.rb +121 -0
- data/spec/image_optim/runner/glob_helpers_spec.rb +25 -0
- data/spec/image_optim/runner/option_parser_spec.rb +99 -0
- data/spec/image_optim/space_spec.rb +25 -0
- data/spec/image_optim/worker_spec.rb +192 -0
- data/spec/image_optim_spec.rb +242 -0
- data/spec/images/comparison.png +0 -0
- data/spec/images/decompressed.jpeg +0 -0
- data/spec/images/icecream.gif +0 -0
- data/spec/images/image.jpg +0 -0
- data/spec/images/invisiblepixels/generate +24 -0
- data/spec/images/invisiblepixels/image.png +0 -0
- data/spec/images/lena.jpg +0 -0
- data/spec/images/orient/0.jpg +0 -0
- data/spec/images/orient/1.jpg +0 -0
- data/spec/images/orient/2.jpg +0 -0
- data/spec/images/orient/3.jpg +0 -0
- data/spec/images/orient/4.jpg +0 -0
- data/spec/images/orient/5.jpg +0 -0
- data/spec/images/orient/6.jpg +0 -0
- data/spec/images/orient/7.jpg +0 -0
- data/spec/images/orient/8.jpg +0 -0
- data/spec/images/orient/generate +23 -0
- data/spec/images/orient/original.jpg +0 -0
- data/spec/images/quant/64.png +0 -0
- data/spec/images/quant/generate +25 -0
- data/spec/images/rails.png +0 -0
- data/spec/images/test.svg +3 -0
- data/spec/images/transparency1.png +0 -0
- data/spec/images/transparency2.png +0 -0
- data/spec/images/vergroessert.jpg +0 -0
- data/spec/spec_helper.rb +64 -0
- data/vendor/jpegrescan +143 -0
- metadata +308 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
Dir.chdir(File.dirname(__FILE__))
|
|
4
|
+
|
|
5
|
+
require 'shellwords'
|
|
6
|
+
|
|
7
|
+
side = 64
|
|
8
|
+
|
|
9
|
+
IO.popen(%W[
|
|
10
|
+
convert
|
|
11
|
+
-depth 8
|
|
12
|
+
-size #{side}x#{side}
|
|
13
|
+
-strip
|
|
14
|
+
rgba:-
|
|
15
|
+
PNG32:image.png
|
|
16
|
+
].shelljoin, 'w') do |f|
|
|
17
|
+
side.times do |a|
|
|
18
|
+
side.times do |b|
|
|
19
|
+
alpha = [0, 1, 0x7f, 0xff][(a / 8 + b / 8) % 4]
|
|
20
|
+
f << [rand(256), rand(256), rand(256), alpha].pack('C*')
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
system 'image_optim --pngcrush-blacken=n image.png'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
cd "$(dirname "$0")"
|
|
4
|
+
|
|
5
|
+
convert -size 2x2 xc:black -fill '#f00' -draw 'point 0,1' -fill '#0f0' -draw 'point 1,0' -fill '#00f' -draw 'point 1,1' -scale 64x64 original.png
|
|
6
|
+
|
|
7
|
+
convert original.png 0.jpg
|
|
8
|
+
convert original.png 1.jpg
|
|
9
|
+
convert original.png -flop 2.jpg
|
|
10
|
+
convert original.png -rotate 180 3.jpg
|
|
11
|
+
convert original.png -flip 4.jpg
|
|
12
|
+
convert original.png -transpose 5.jpg
|
|
13
|
+
convert original.png -rotate 270 6.jpg
|
|
14
|
+
convert original.png -transverse 7.jpg
|
|
15
|
+
convert original.png -rotate 90 8.jpg
|
|
16
|
+
|
|
17
|
+
convert original.png original.jpg
|
|
18
|
+
rm original.png
|
|
19
|
+
|
|
20
|
+
exiv2 -M"add Exif.Photo.UserComment image_optim-spec" *.jpg
|
|
21
|
+
for i in {1..8}; do
|
|
22
|
+
exiv2 -M"add Exif.Image.Orientation Short $i" $i.jpg
|
|
23
|
+
done
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
Dir.chdir(File.dirname(__FILE__))
|
|
4
|
+
|
|
5
|
+
require 'shellwords'
|
|
6
|
+
|
|
7
|
+
palettes = [64]
|
|
8
|
+
side = 256
|
|
9
|
+
|
|
10
|
+
palettes.each do |palette|
|
|
11
|
+
IO.popen(%W[
|
|
12
|
+
convert
|
|
13
|
+
-depth 8
|
|
14
|
+
-size #{side}x#{side}
|
|
15
|
+
-strip
|
|
16
|
+
rgb:-
|
|
17
|
+
PNG24:#{palette}.png
|
|
18
|
+
].shelljoin, 'w') do |f|
|
|
19
|
+
(side * side).times do |i|
|
|
20
|
+
color = i * palette / (side * side) * 0x10000 / palette
|
|
21
|
+
f << [color / 0x100, color % 0x100, 0].pack('C*')
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
system "identify -format 'Wrote %f with %k unique colors\n' #{palette}.png"
|
|
25
|
+
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
if ENV['CODECLIMATE_REPO_TOKEN']
|
|
2
|
+
begin
|
|
3
|
+
require 'codeclimate-test-reporter'
|
|
4
|
+
CodeClimate::TestReporter.start
|
|
5
|
+
rescue LoadError => e
|
|
6
|
+
$stderr.puts "Got following while loading codeclimate-test-reporter: #{e}"
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
RSpec.configure do |c|
|
|
11
|
+
c.alias_example_to :they
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def flatten_animation(image)
|
|
15
|
+
if image.format == :gif
|
|
16
|
+
flattened = image.temp_path
|
|
17
|
+
flatten_command = %W[
|
|
18
|
+
convert
|
|
19
|
+
#{image.to_s.shellescape}
|
|
20
|
+
-coalesce
|
|
21
|
+
-append
|
|
22
|
+
#{flattened.to_s.shellescape}
|
|
23
|
+
].join(' ')
|
|
24
|
+
expect(ImageOptim::Cmd.run(flatten_command)).to be_truthy
|
|
25
|
+
flattened
|
|
26
|
+
else
|
|
27
|
+
image
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def nrmse(image_a, image_b)
|
|
32
|
+
coalesce_a = flatten_animation(image_a)
|
|
33
|
+
coalesce_b = flatten_animation(image_b)
|
|
34
|
+
nrmse_command = %W[
|
|
35
|
+
compare
|
|
36
|
+
-metric RMSE
|
|
37
|
+
-alpha Background
|
|
38
|
+
#{coalesce_a.to_s.shellescape}
|
|
39
|
+
#{coalesce_b.to_s.shellescape}
|
|
40
|
+
/dev/null
|
|
41
|
+
2>&1
|
|
42
|
+
].join(' ')
|
|
43
|
+
output = ImageOptim::Cmd.capture(nrmse_command)
|
|
44
|
+
if [0, 1].include?($CHILD_STATUS.exitstatus)
|
|
45
|
+
output[/\((\d+(\.\d+)?)\)/, 1].to_f
|
|
46
|
+
else
|
|
47
|
+
fail "compare #{image_a} with #{image_b} failed with `#{output}`"
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
RSpec::Matchers.define :be_smaller_than do |expected|
|
|
52
|
+
match{ |actual| actual.size < expected.size }
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
RSpec::Matchers.define :be_similar_to do |expected, max_difference|
|
|
56
|
+
match do |actual|
|
|
57
|
+
@diff = nrmse(actual, expected)
|
|
58
|
+
@diff <= max_difference
|
|
59
|
+
end
|
|
60
|
+
failure_message do |actual|
|
|
61
|
+
"expected #{actual} to have at most #{max_difference} difference from "\
|
|
62
|
+
"#{expected}, got normalized root-mean-square error of #{@diff}"
|
|
63
|
+
end
|
|
64
|
+
end
|
data/vendor/jpegrescan
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#!/usr/bin/perl -ws
|
|
2
|
+
# jpegrescan by Loren Merritt
|
|
3
|
+
# Last updated: 2008-11-29 / 2013-03-19
|
|
4
|
+
# This code is public domain.
|
|
5
|
+
|
|
6
|
+
use File::Slurp;
|
|
7
|
+
use File::Temp qw/ tempfile /;
|
|
8
|
+
|
|
9
|
+
@ARGV==2 or die "usage: jpegrescan in.jpg out.jpg
|
|
10
|
+
tries various progressive scan orders
|
|
11
|
+
switches:
|
|
12
|
+
-s strip from all extra markers (`jpegtran -copy none` otherwise `jpegtran -copy all`)
|
|
13
|
+
-v verbose output
|
|
14
|
+
-q supress all output
|
|
15
|
+
";
|
|
16
|
+
$fin = $ARGV[0];
|
|
17
|
+
$fout = $ARGV[1];
|
|
18
|
+
(undef, $ftmp) = tempfile(SUFFIX => ".scan");
|
|
19
|
+
$jtmp = $fout;
|
|
20
|
+
$verbose = $v;
|
|
21
|
+
$quiet = $q;
|
|
22
|
+
@strip = $s ? ("-copy","none") : ("-copy","all");
|
|
23
|
+
undef $_ for $v,$q,$s;
|
|
24
|
+
undef $/;
|
|
25
|
+
$|=1;
|
|
26
|
+
|
|
27
|
+
# convert the input to baseline, just to make all the other conversions faster
|
|
28
|
+
# FIXME there's still a bunch of redundant computation in separate calls to jpegtran
|
|
29
|
+
open $OLDERR, ">&", STDERR;
|
|
30
|
+
open STDERR, ">", $ftmp;
|
|
31
|
+
open TRAN, "-|", "jpegtran", "-v", @strip, "-optimize", $fin or die;
|
|
32
|
+
write_file($jtmp, <TRAN>);
|
|
33
|
+
close TRAN;
|
|
34
|
+
open STDERR, ">&", $OLDERR;
|
|
35
|
+
|
|
36
|
+
$type = read_file($ftmp);
|
|
37
|
+
$type =~ /components=(\d+)/ or die;
|
|
38
|
+
$rgb = $1==3 ? 1 : $1==1 ? 0 : die "not RGB nor gray\n";
|
|
39
|
+
|
|
40
|
+
# FIXME optimize order for either progressive transfer or decoding speed
|
|
41
|
+
sub canonize {
|
|
42
|
+
my $txt = $prefix.$suffix.shift;
|
|
43
|
+
$txt =~ s/\s*;\s*/;\n/g;
|
|
44
|
+
$txt =~ s/^\s*//;
|
|
45
|
+
$txt =~ s/ +/ /g;
|
|
46
|
+
$txt =~ s/: (\d+) (\d+)/sprintf ": %2d %2d", $1, $2/ge;
|
|
47
|
+
# treat u and v identically. I shouldn't need to do this, but with jpegtran overhead it saves 9% speed. cost: .008% bitrate.
|
|
48
|
+
$txt =~ s/^2:.*\n//gm;
|
|
49
|
+
$txt =~ s/^1:(.+)\n/1:$1\n2:$1\n/gm;
|
|
50
|
+
# dc before ac, coarse before fine
|
|
51
|
+
my @txt = sort {"$a\n$b" =~ /: *(\d+) .* (\d);\n.*: *(\d+) .* (\d);/ or die; !$3 <=> !$1 or $4 <=> $2 or $a cmp $b;} split /\n/, $txt;
|
|
52
|
+
return join "\n", @txt;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
sub try {
|
|
56
|
+
my $txt = canonize(shift);
|
|
57
|
+
return $memo{$txt} if $memo{$txt};
|
|
58
|
+
write_file($ftmp, $txt);
|
|
59
|
+
open TRAN, "-|", "jpegtran", @strip, "-scans", $ftmp, $jtmp or die;
|
|
60
|
+
$data = <TRAN>;
|
|
61
|
+
close TRAN;
|
|
62
|
+
my $s = length $data;
|
|
63
|
+
$s or die;
|
|
64
|
+
$memo{$txt} = $s;
|
|
65
|
+
!$quiet && print $verbose ? "$txt\n$s\n\n" : ".";
|
|
66
|
+
return $s;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
sub triesn {
|
|
70
|
+
my($bmode, $bsize);
|
|
71
|
+
my ($limit, @modes) = @_;
|
|
72
|
+
my $overshoot = 0;
|
|
73
|
+
for(@modes) {
|
|
74
|
+
my $s = try($_);
|
|
75
|
+
if(!$bsize || $s < $bsize) {
|
|
76
|
+
$bsize = $s;
|
|
77
|
+
$bmode = $_;
|
|
78
|
+
$overshoot = 0;
|
|
79
|
+
} elsif(++$overshoot >= $limit) {
|
|
80
|
+
last;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return $bmode;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
sub tries { triesn(99, @_); }
|
|
87
|
+
|
|
88
|
+
$prefix = "";
|
|
89
|
+
$suffix = "";
|
|
90
|
+
|
|
91
|
+
if($rgb) {
|
|
92
|
+
# 012 helps very little
|
|
93
|
+
# 0/12 and 0/1/2 are pretty evenly matched in frequency, but 0/12 wins in total size if every image had to use the same mode
|
|
94
|
+
# dc refinement passes never help
|
|
95
|
+
$dc = tries(
|
|
96
|
+
# "0: 0 0 0 0; 1 2: 0 0 0 0;", # two scans expose a bug in Opera <= 11.61
|
|
97
|
+
"0: 0 0 0 0; 1: 0 0 0 0; 2: 0 0 0 0;");
|
|
98
|
+
# jpegtran won't let me omit dc entirely, but I can at least quantize it away to make the rest of the tests faster.
|
|
99
|
+
$prefix = "0 1 2: 0 0 0 9;";
|
|
100
|
+
} else {
|
|
101
|
+
$dc = "0: 0 0 0 0;";
|
|
102
|
+
$prefix = "0: 0 0 0 9;";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
# luma can make use of up to 3 refinement passes.
|
|
106
|
+
# chroma can make use of up to 2 refinement passes.
|
|
107
|
+
# refinement passes have some chance of being split (luma: 4%,4%,4%. chroma: 20%,8%) but the total bit gain is negligible.
|
|
108
|
+
# msb pass should almost always be split (luma: 87%, chroma: 81%).
|
|
109
|
+
# I have no theoretical reason for this list of split positions, they're just the most common in practice.
|
|
110
|
+
# splitting into 3 ections is often slightly better, but the total number of bits saved is negligible.
|
|
111
|
+
# FIXME: penalize lots of refinement passes because it's slower to decode. if so, then also force overwrite if bigger than the input.
|
|
112
|
+
sub try_splits {
|
|
113
|
+
my $str = shift;
|
|
114
|
+
my %n = map {$_ => sprintf "$c: 1 %d $str; $c: %d 63 $str;", $_, $_+1} 2,5,8,12,18;
|
|
115
|
+
my $mode = triesn(2, "$c: 1 63 $str;", @n{2,8,5});
|
|
116
|
+
return $mode if $mode ne $n{8};
|
|
117
|
+
return triesn(1, $mode, @n{12,18});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
foreach $c (0..$rgb) {
|
|
121
|
+
my @modes;
|
|
122
|
+
my $ml = "";
|
|
123
|
+
for(0..($c?2:3)) {
|
|
124
|
+
push @modes, "$c: 1 8 0 $_; $c: 9 63 0 $_;".$ml;
|
|
125
|
+
$ml .= sprintf("$c: 1 63 %d %d;", $_+1, $_);
|
|
126
|
+
}
|
|
127
|
+
my $refine = triesn(1, @modes);
|
|
128
|
+
$refine =~ s/.* (0 \d);//;
|
|
129
|
+
$ac .= $refine . try_splits($1);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
$prefix = "";
|
|
133
|
+
undef %memo;
|
|
134
|
+
$mode = canonize($dc.$ac);
|
|
135
|
+
try($mode);
|
|
136
|
+
$size = $memo{$mode};
|
|
137
|
+
!$quiet && print "\n$mode\n$size\n";
|
|
138
|
+
$old_size = -s $fin;
|
|
139
|
+
!$quiet && printf "%+.2f%%\n", ($size/$old_size-1)*100;
|
|
140
|
+
if($size < $old_size) {
|
|
141
|
+
write_file($fout, $data);
|
|
142
|
+
}
|
|
143
|
+
unlink $ftmp;
|
metadata
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: openstreetmap-image_optim
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.21.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Ivan Kuchin
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: fspath
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '2.1'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '2.1'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: image_size
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.3'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.3'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: exifr
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '1.2'
|
|
48
|
+
- - ">="
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: 1.2.2
|
|
51
|
+
type: :runtime
|
|
52
|
+
prerelease: false
|
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - "~>"
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '1.2'
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 1.2.2
|
|
61
|
+
- !ruby/object:Gem::Dependency
|
|
62
|
+
name: progress
|
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '3.0'
|
|
68
|
+
- - ">="
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: 3.0.1
|
|
71
|
+
type: :runtime
|
|
72
|
+
prerelease: false
|
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - "~>"
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: '3.0'
|
|
78
|
+
- - ">="
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: 3.0.1
|
|
81
|
+
- !ruby/object:Gem::Dependency
|
|
82
|
+
name: in_threads
|
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - "~>"
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: '1.3'
|
|
88
|
+
type: :runtime
|
|
89
|
+
prerelease: false
|
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '1.3'
|
|
95
|
+
- !ruby/object:Gem::Dependency
|
|
96
|
+
name: image_optim_pack
|
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '0.2'
|
|
102
|
+
type: :development
|
|
103
|
+
prerelease: false
|
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - "~>"
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '0.2'
|
|
109
|
+
- !ruby/object:Gem::Dependency
|
|
110
|
+
name: rspec
|
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
|
112
|
+
requirements:
|
|
113
|
+
- - "~>"
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: '3.0'
|
|
116
|
+
type: :development
|
|
117
|
+
prerelease: false
|
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - "~>"
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '3.0'
|
|
123
|
+
- !ruby/object:Gem::Dependency
|
|
124
|
+
name: rubocop
|
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
|
126
|
+
requirements:
|
|
127
|
+
- - "~>"
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: '0.27'
|
|
130
|
+
- - "!="
|
|
131
|
+
- !ruby/object:Gem::Version
|
|
132
|
+
version: 0.30.1
|
|
133
|
+
type: :development
|
|
134
|
+
prerelease: false
|
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
136
|
+
requirements:
|
|
137
|
+
- - "~>"
|
|
138
|
+
- !ruby/object:Gem::Version
|
|
139
|
+
version: '0.27'
|
|
140
|
+
- - "!="
|
|
141
|
+
- !ruby/object:Gem::Version
|
|
142
|
+
version: 0.30.1
|
|
143
|
+
description:
|
|
144
|
+
email:
|
|
145
|
+
executables:
|
|
146
|
+
- image_optim
|
|
147
|
+
extensions: []
|
|
148
|
+
extra_rdoc_files: []
|
|
149
|
+
files:
|
|
150
|
+
- ".gitignore"
|
|
151
|
+
- ".rubocop.yml"
|
|
152
|
+
- ".travis.yml"
|
|
153
|
+
- CHANGELOG.markdown
|
|
154
|
+
- CONTRIBUTING.markdown
|
|
155
|
+
- Gemfile
|
|
156
|
+
- LICENSE.txt
|
|
157
|
+
- README.markdown
|
|
158
|
+
- Vagrantfile
|
|
159
|
+
- bin/image_optim
|
|
160
|
+
- image_optim.gemspec
|
|
161
|
+
- lib/image_optim.rb
|
|
162
|
+
- lib/image_optim/bin_resolver.rb
|
|
163
|
+
- lib/image_optim/bin_resolver/bin.rb
|
|
164
|
+
- lib/image_optim/bin_resolver/comparable_condition.rb
|
|
165
|
+
- lib/image_optim/bin_resolver/error.rb
|
|
166
|
+
- lib/image_optim/bin_resolver/simple_version.rb
|
|
167
|
+
- lib/image_optim/cmd.rb
|
|
168
|
+
- lib/image_optim/config.rb
|
|
169
|
+
- lib/image_optim/configuration_error.rb
|
|
170
|
+
- lib/image_optim/handler.rb
|
|
171
|
+
- lib/image_optim/hash_helpers.rb
|
|
172
|
+
- lib/image_optim/image_meta.rb
|
|
173
|
+
- lib/image_optim/image_path.rb
|
|
174
|
+
- lib/image_optim/non_negative_integer_range.rb
|
|
175
|
+
- lib/image_optim/option_definition.rb
|
|
176
|
+
- lib/image_optim/option_helpers.rb
|
|
177
|
+
- lib/image_optim/railtie.rb
|
|
178
|
+
- lib/image_optim/runner.rb
|
|
179
|
+
- lib/image_optim/runner/glob_helpers.rb
|
|
180
|
+
- lib/image_optim/runner/option_parser.rb
|
|
181
|
+
- lib/image_optim/space.rb
|
|
182
|
+
- lib/image_optim/true_false_nil.rb
|
|
183
|
+
- lib/image_optim/worker.rb
|
|
184
|
+
- lib/image_optim/worker/advpng.rb
|
|
185
|
+
- lib/image_optim/worker/class_methods.rb
|
|
186
|
+
- lib/image_optim/worker/gifsicle.rb
|
|
187
|
+
- lib/image_optim/worker/jhead.rb
|
|
188
|
+
- lib/image_optim/worker/jpegoptim.rb
|
|
189
|
+
- lib/image_optim/worker/jpegrecompress.rb
|
|
190
|
+
- lib/image_optim/worker/jpegtran.rb
|
|
191
|
+
- lib/image_optim/worker/optipng.rb
|
|
192
|
+
- lib/image_optim/worker/pngcrush.rb
|
|
193
|
+
- lib/image_optim/worker/pngout.rb
|
|
194
|
+
- lib/image_optim/worker/pngquant.rb
|
|
195
|
+
- lib/image_optim/worker/svgo.rb
|
|
196
|
+
- script/template/jquery-2.1.3.min.js
|
|
197
|
+
- script/template/sortable-0.6.0.min.js
|
|
198
|
+
- script/template/worker_analysis.erb
|
|
199
|
+
- script/update_worker_options_in_readme
|
|
200
|
+
- script/worker_analysis
|
|
201
|
+
- spec/image_optim/bin_resolver/comparable_condition_spec.rb
|
|
202
|
+
- spec/image_optim/bin_resolver/simple_version_spec.rb
|
|
203
|
+
- spec/image_optim/bin_resolver_spec.rb
|
|
204
|
+
- spec/image_optim/cmd_spec.rb
|
|
205
|
+
- spec/image_optim/config_spec.rb
|
|
206
|
+
- spec/image_optim/handler_spec.rb
|
|
207
|
+
- spec/image_optim/hash_helpers_spec.rb
|
|
208
|
+
- spec/image_optim/image_path_spec.rb
|
|
209
|
+
- spec/image_optim/railtie_spec.rb
|
|
210
|
+
- spec/image_optim/runner/glob_helpers_spec.rb
|
|
211
|
+
- spec/image_optim/runner/option_parser_spec.rb
|
|
212
|
+
- spec/image_optim/space_spec.rb
|
|
213
|
+
- spec/image_optim/worker_spec.rb
|
|
214
|
+
- spec/image_optim_spec.rb
|
|
215
|
+
- spec/images/comparison.png
|
|
216
|
+
- spec/images/decompressed.jpeg
|
|
217
|
+
- spec/images/icecream.gif
|
|
218
|
+
- spec/images/image.jpg
|
|
219
|
+
- spec/images/invisiblepixels/generate
|
|
220
|
+
- spec/images/invisiblepixels/image.png
|
|
221
|
+
- spec/images/lena.jpg
|
|
222
|
+
- spec/images/orient/0.jpg
|
|
223
|
+
- spec/images/orient/1.jpg
|
|
224
|
+
- spec/images/orient/2.jpg
|
|
225
|
+
- spec/images/orient/3.jpg
|
|
226
|
+
- spec/images/orient/4.jpg
|
|
227
|
+
- spec/images/orient/5.jpg
|
|
228
|
+
- spec/images/orient/6.jpg
|
|
229
|
+
- spec/images/orient/7.jpg
|
|
230
|
+
- spec/images/orient/8.jpg
|
|
231
|
+
- spec/images/orient/generate
|
|
232
|
+
- spec/images/orient/original.jpg
|
|
233
|
+
- spec/images/quant/64.png
|
|
234
|
+
- spec/images/quant/generate
|
|
235
|
+
- spec/images/rails.png
|
|
236
|
+
- spec/images/test.svg
|
|
237
|
+
- spec/images/transparency1.png
|
|
238
|
+
- spec/images/transparency2.png
|
|
239
|
+
- spec/images/vergroessert.jpg
|
|
240
|
+
- spec/spec_helper.rb
|
|
241
|
+
- vendor/jpegrescan
|
|
242
|
+
homepage: http://github.com/toy/openstreetmap-image_optim
|
|
243
|
+
licenses:
|
|
244
|
+
- MIT
|
|
245
|
+
metadata: {}
|
|
246
|
+
post_install_message:
|
|
247
|
+
rdoc_options: []
|
|
248
|
+
require_paths:
|
|
249
|
+
- lib
|
|
250
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
251
|
+
requirements:
|
|
252
|
+
- - ">="
|
|
253
|
+
- !ruby/object:Gem::Version
|
|
254
|
+
version: '0'
|
|
255
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
|
+
requirements:
|
|
257
|
+
- - ">="
|
|
258
|
+
- !ruby/object:Gem::Version
|
|
259
|
+
version: '0'
|
|
260
|
+
requirements: []
|
|
261
|
+
rubyforge_project: openstreetmap-image_optim
|
|
262
|
+
rubygems_version: 2.4.8
|
|
263
|
+
signing_key:
|
|
264
|
+
specification_version: 4
|
|
265
|
+
summary: Optimize (lossless compress, optionally lossy) images (jpeg, png, gif, svg)
|
|
266
|
+
using external utilities (advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegrescan,
|
|
267
|
+
jpegtran, optipng, pngcrush, pngout, pngquant, svgo)
|
|
268
|
+
test_files:
|
|
269
|
+
- spec/image_optim/bin_resolver/comparable_condition_spec.rb
|
|
270
|
+
- spec/image_optim/bin_resolver/simple_version_spec.rb
|
|
271
|
+
- spec/image_optim/bin_resolver_spec.rb
|
|
272
|
+
- spec/image_optim/cmd_spec.rb
|
|
273
|
+
- spec/image_optim/config_spec.rb
|
|
274
|
+
- spec/image_optim/handler_spec.rb
|
|
275
|
+
- spec/image_optim/hash_helpers_spec.rb
|
|
276
|
+
- spec/image_optim/image_path_spec.rb
|
|
277
|
+
- spec/image_optim/railtie_spec.rb
|
|
278
|
+
- spec/image_optim/runner/glob_helpers_spec.rb
|
|
279
|
+
- spec/image_optim/runner/option_parser_spec.rb
|
|
280
|
+
- spec/image_optim/space_spec.rb
|
|
281
|
+
- spec/image_optim/worker_spec.rb
|
|
282
|
+
- spec/image_optim_spec.rb
|
|
283
|
+
- spec/images/comparison.png
|
|
284
|
+
- spec/images/decompressed.jpeg
|
|
285
|
+
- spec/images/icecream.gif
|
|
286
|
+
- spec/images/image.jpg
|
|
287
|
+
- spec/images/invisiblepixels/generate
|
|
288
|
+
- spec/images/invisiblepixels/image.png
|
|
289
|
+
- spec/images/lena.jpg
|
|
290
|
+
- spec/images/orient/0.jpg
|
|
291
|
+
- spec/images/orient/1.jpg
|
|
292
|
+
- spec/images/orient/2.jpg
|
|
293
|
+
- spec/images/orient/3.jpg
|
|
294
|
+
- spec/images/orient/4.jpg
|
|
295
|
+
- spec/images/orient/5.jpg
|
|
296
|
+
- spec/images/orient/6.jpg
|
|
297
|
+
- spec/images/orient/7.jpg
|
|
298
|
+
- spec/images/orient/8.jpg
|
|
299
|
+
- spec/images/orient/generate
|
|
300
|
+
- spec/images/orient/original.jpg
|
|
301
|
+
- spec/images/quant/64.png
|
|
302
|
+
- spec/images/quant/generate
|
|
303
|
+
- spec/images/rails.png
|
|
304
|
+
- spec/images/test.svg
|
|
305
|
+
- spec/images/transparency1.png
|
|
306
|
+
- spec/images/transparency2.png
|
|
307
|
+
- spec/images/vergroessert.jpg
|
|
308
|
+
- spec/spec_helper.rb
|