webp-ffi 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f364ab9bc7c7c63c86d7c1a3971455fae82ddb7b
4
+ data.tar.gz: 3644ae9f98131f89ead6e3a21c6c212172700f38
5
+ SHA512:
6
+ metadata.gz: 65925b23c34735ce7475fdd0fcb97e034a45afbb3691389f408d1a1c3849eb4593b670982bfb7af515daf33ade71bbb166031b017aeb7d76993d07e6f9d53339
7
+ data.tar.gz: 8f38f8223500e9480c57bbd8f5c5cb7bd4c796c2d7504f5bfc58adb5bcb2ffc8484cc066dae4908142de7f9c5d450dfaccdfa8230117f0568e4ab28acc9a40b7
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0
data/README.md CHANGED
@@ -56,6 +56,7 @@ Basic info about libwebp (encoder and decoder versions):
56
56
  => "0.2.0"
57
57
  2.0.0p0 :003 > WebP.encoder_version
58
58
  => "0.2.0"
59
+
59
60
 
60
61
  ### WebP size (width and height)
61
62
 
@@ -64,6 +65,7 @@ Get size (width and height) from webp image:
64
65
  filename = File.expand_path(File.join(File.dirname(__FILE__), "spec/factories/4.webp"))
65
66
  WebP.webp_size(File.open(filename, "rb").read)
66
67
  => [2000, 2353]
68
+
67
69
 
68
70
  ### Encode WebP image
69
71
 
@@ -72,12 +74,14 @@ Encode png, jpg or tiff image to webp:
72
74
  filename = File.expand_path(File.join(File.dirname(__FILE__), "spec/factories/4.png"))
73
75
  out_filename = File.expand_path(File.join(File.dirname(__FILE__), "tmp/4.webp"))
74
76
  WebP.encode(filename, out_filename)
77
+
75
78
 
76
79
  Encode png, jpg or tiff image to webp with options:
77
80
 
78
81
  WebP.encode(filename, out_filename, quality: 50, resize_w: 100, resize_h: 200)
79
82
  WebP.encode(filename, out_filename, quality: 75, crop_x: 0, cropt_y: 0, crop_w: 100, crop_h: 100)
80
83
 
84
+
81
85
  Possible encode options:
82
86
 
83
87
  * **lossless** (int) - Lossless encoding (0=lossy(default), 1=lossless)
@@ -111,6 +115,7 @@ Decode webp image (default format is png):
111
115
  out_filename = File.expand_path(File.join(File.dirname(__FILE__), "tmp/4.png"))
112
116
  WebP.decode(filename, out_filename)
113
117
 
118
+
114
119
  Decode webp image to pam, ppm or pgm format of image:
115
120
 
116
121
  filename = File.expand_path(File.join(File.dirname(__FILE__), "spec/factories/4.webp"))
@@ -119,11 +124,13 @@ Decode webp image to pam, ppm or pgm format of image:
119
124
  WebP.decode(filename, out_filename, output_format: :ppm)
120
125
  WebP.decode(filename, out_filename, output_format: :pgm)
121
126
 
127
+
122
128
  Decode webp image with options:
123
129
 
124
130
  WebP.encode(filename, out_filename, resize_w: 100, resize_h: 200)
125
131
  WebP.encode(filename, out_filename, crop_x: 0, cropt_y: 0, crop_w: 100, crop_h: 100)
126
132
 
133
+
127
134
  Possible decode options:
128
135
 
129
136
  * **bypass\_filtering** (bool) - disable in-loop filtering
data/ext/webp_ffi/util.h CHANGED
@@ -27,6 +27,9 @@ int UtilSaveOutput(const WebPDecBuffer* const buffer, OutputFileFormat format, c
27
27
  int UtilReadFile(const char* const file_name,
28
28
  const uint8_t** data, size_t* data_size);
29
29
 
30
+ int UtilReadPicture(const char* const filename, WebPPicture* const pic,
31
+ int keep_alpha);
32
+
30
33
  #if defined(__cplusplus) || defined(c_plusplus)
31
34
  } // extern "C"
32
35
  #endif
data/lib/webp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module WebP
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/spec/travis_build.sh CHANGED
@@ -1,7 +1,7 @@
1
1
  #/usr/bin/env sh
2
- wget https://webp.googlecode.com/files/libwebp-0.2.1.tar.gz
3
- tar xvzf libwebp-0.2.1.tar.gz
4
- cd libwebp-0.2.1
2
+ wget http://webp.googlecode.com/files/libwebp-0.3.0.tar.gz
3
+ tar xvzf libwebp-0.3.0.tar.gz
4
+ cd libwebp-0.3.0
5
5
  ./configure
6
6
  make
7
7
  sudo make install
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webp-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
5
- prerelease:
4
+ version: 0.1.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alexey Vasyliev
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-13 00:00:00.000000000 Z
11
+ date: 2013-07-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: ffi
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: ffi-compiler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - '>='
92
81
  - !ruby/object:Gem::Version
@@ -100,7 +89,7 @@ extensions:
100
89
  extra_rdoc_files: []
101
90
  files:
102
91
  - .gitignore
103
- - .rvmrc
92
+ - .ruby-version
104
93
  - .travis.yml
105
94
  - CHANGELOG.md
106
95
  - Gemfile
@@ -137,33 +126,26 @@ files:
137
126
  homepage: http://leopard.in.ua/webp-ffi
138
127
  licenses:
139
128
  - MIT
129
+ metadata: {}
140
130
  post_install_message:
141
131
  rdoc_options: []
142
132
  require_paths:
143
133
  - lib
144
134
  required_ruby_version: !ruby/object:Gem::Requirement
145
- none: false
146
135
  requirements:
147
136
  - - '>='
148
137
  - !ruby/object:Gem::Version
149
138
  version: '0'
150
- segments:
151
- - 0
152
- hash: -4206358326221874067
153
139
  required_rubygems_version: !ruby/object:Gem::Requirement
154
- none: false
155
140
  requirements:
156
141
  - - '>='
157
142
  - !ruby/object:Gem::Version
158
143
  version: '0'
159
- segments:
160
- - 0
161
- hash: -4206358326221874067
162
144
  requirements: []
163
145
  rubyforge_project:
164
- rubygems_version: 1.8.25
146
+ rubygems_version: 2.0.3
165
147
  signing_key:
166
- specification_version: 3
148
+ specification_version: 4
167
149
  summary: Ruby wrapper for libwebp
168
150
  test_files:
169
151
  - spec/factories/1.png
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm ruby-2.0.0-p0