image_optim 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +48 -2
- data/image_optim.gemspec +2 -2
- metadata +6 -6
data/README.markdown
CHANGED
@@ -1,9 +1,55 @@
|
|
1
1
|
# image_optim
|
2
2
|
|
3
|
-
Optimize images (jpeg, png, gif) using external utilities (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout).
|
3
|
+
Optimize (lossless compress) images (jpeg, png, gif) using external utilities (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout).
|
4
4
|
|
5
5
|
Based on [ImageOptim.app](http://imageoptim.pornel.net/).
|
6
6
|
|
7
|
+
## Gem Installation
|
8
|
+
|
9
|
+
gem install image_optim
|
10
|
+
|
11
|
+
## Binaries Installation
|
12
|
+
|
13
|
+
### Linux - Debian/Ubuntu
|
14
|
+
|
15
|
+
sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush
|
16
|
+
|
17
|
+
### Linux - RHEL/Fedora/Centos
|
18
|
+
|
19
|
+
sudo yum install -y advancecomp gifsicle libjpeg optipng
|
20
|
+
|
21
|
+
You will also need to install `jpegoptim` and `pngcrush` from source:
|
22
|
+
|
23
|
+
#### jpegoptim
|
24
|
+
|
25
|
+
cd /tmp
|
26
|
+
curl -O http://www.kokkonen.net/tjko/src/jpegoptim-1.2.4.tar.gz
|
27
|
+
tar zxf jpegoptim-1.2.4.tar.gz
|
28
|
+
cd jpegoptim-1.2.4
|
29
|
+
./configure && make && make install
|
30
|
+
|
31
|
+
#### pngcrush
|
32
|
+
|
33
|
+
cd /tmp
|
34
|
+
curl -O http://iweb.dl.sourceforge.net/project/pmt/pngcrush/1.7.24/pngcrush-1.7.24.tar.bz2
|
35
|
+
tar jxf pngcrush-1.7.24.tar.bz2
|
36
|
+
cd pngcrush-1.7.24
|
37
|
+
make && cp -f pngcrush /usr/local/bin
|
38
|
+
|
39
|
+
### OS X - Macports
|
40
|
+
|
41
|
+
sudo port install advancecomp gifsicle jpegoptim jpeg optipng pngcrush
|
42
|
+
|
43
|
+
### OS X - Brew
|
44
|
+
|
45
|
+
brew install advancecomp gifsicle jpegoptim jpeg optipng pngcrush
|
46
|
+
|
47
|
+
## pngout Installation (optional)
|
48
|
+
|
49
|
+
You can install `pngout` by downloading and installing the [binary versions](http://www.jonof.id.au/kenutils).
|
50
|
+
|
51
|
+
_Note: pngout is free to use even in commercial soft, but you can not redistribute, repackage or reuse it without consent and agreement of creator. [license](http://advsys.net/ken/utils.htm#pngoutkziplicense)_
|
52
|
+
|
7
53
|
## Usage
|
8
54
|
|
9
55
|
In terminal:
|
@@ -26,7 +72,7 @@ Optimize image getting temp path:
|
|
26
72
|
|
27
73
|
Optimize image in place:
|
28
74
|
|
29
|
-
io.optimize_image('b.jpg')
|
75
|
+
io.optimize_image!('b.jpg')
|
30
76
|
|
31
77
|
Multiple images:
|
32
78
|
|
data/image_optim.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'image_optim'
|
5
|
-
s.version = '0.4.
|
6
|
-
s.summary = %q{Optimize images (jpeg, png, gif) using external utilities (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout)}
|
5
|
+
s.version = '0.4.1'
|
6
|
+
s.summary = %q{Optimize (lossless compress) images (jpeg, png, gif) using external utilities (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout)}
|
7
7
|
s.homepage = "http://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
9
9
|
s.license = 'MIT'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_optim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ivan Kuchin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-02-14 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: fspath
|
@@ -160,10 +160,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
requirements: []
|
161
161
|
|
162
162
|
rubyforge_project: image_optim
|
163
|
-
rubygems_version: 1.8.
|
163
|
+
rubygems_version: 1.8.16
|
164
164
|
signing_key:
|
165
165
|
specification_version: 3
|
166
|
-
summary: Optimize images (jpeg, png, gif) using external utilities (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout)
|
166
|
+
summary: Optimize (lossless compress) images (jpeg, png, gif) using external utilities (advpng, gifsicle, jpegoptim, jpegtran, optipng, pngcrush, pngout)
|
167
167
|
test_files:
|
168
168
|
- spec/image_optim_spec.rb
|
169
169
|
- spec/images/comparison.png
|