libpng-ruby 0.5.2 → 0.7.0

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
  SHA256:
3
- metadata.gz: 01ba3c06d3239eb5638f1a4b316988f36b64e571aa8d571b3e61e46dd6f296f2
4
- data.tar.gz: 5d6cc04e434eb327aa111a388e4838e2bbc841a9f18b5703589d9c610ac79e9b
3
+ metadata.gz: 5a7a14159672b5baccc3dc51269db0f83b942d57062d970d1b4870cdf560f3a8
4
+ data.tar.gz: e923bf2f1a1e4fb42b51808949baee393cbbb8e7f3dc51b61b69f9927ef4dfcb
5
5
  SHA512:
6
- metadata.gz: 48977b718f74f3df9124a6e8cceba2bacd2d7cf2fbfdce2098585b9cf56ca59f0248ed1477ebe488d854b988408d86a134629c7b3466e4f5fa5f72fed7919ff7
7
- data.tar.gz: 297bcc6fb934b6a42f7638c421ffe772246a9952670afd795b2e5f4ba4658256826c21650e3df22e177bf9ab82b9fc726c3ff9c7a5c3f22a665313c01ccb591b
6
+ metadata.gz: b89324c661cba887d6de37719d8131236f6801e3ebe266ee029cbd19e58ea1e05a2fa8f995e716b4dc347055e318bc68bf3829e69f3c64a8ecf3cc4a54cb4b15
7
+ data.tar.gz: 2d236ed145212e145d7eba5a02d8fc5ae24da0b998a61054a5ad314dff06d050b25edf1a5ee75c9478e879ccb9b647a5526a13e9148aa3f30475fa69b1eaa78f
data/README.md CHANGED
@@ -15,6 +15,10 @@ Or install it yourself as:
15
15
 
16
16
  $ gem install libpng-ruby
17
17
 
18
+ If you need to specify the libpng path, use the following options:
19
+
20
+ $ gem install libpng-ruby -- --with-png-include ~/env/opts/include --with-png-lib ~/env/opts/lib
21
+
18
22
  ## Usage
19
23
 
20
24
  ### decode sample
@@ -22,7 +26,7 @@ Or install it yourself as:
22
26
  ```ruby
23
27
  require 'png'
24
28
 
25
- dec = PNG::Decoder.new(:color_type => :BGR)
29
+ dec = PNG::Decoder.new(:pixel_format => :BGR)
26
30
 
27
31
  p dec.read_header(IO.binread("test.png"))
28
32
 
@@ -55,7 +59,7 @@ IO.binwrite("test.png", enc << IO.binread("test.raw"))
55
59
  #### encode options
56
60
  | option | value type | description |
57
61
  |---|---|---|
58
- | :pixel_fromat | String or Symbol | input pixel format |
62
+ | :pixel_format | String or Symbol | input pixel format |
59
63
  | :interlace | Boolean | use interlace mode |
60
64
  | :compression | Integer or String or Symbol | compression level |
61
65
  | :text | Hash | text information |
data/ext/png/extconf.rb CHANGED
@@ -1,4 +1,17 @@
1
1
  require 'mkmf'
2
+ require 'optparse'
3
+
4
+ OptionParser.new { |opt|
5
+ opt.on('--with-png-include=PATH', String) { |path|
6
+ $CFLAGS << " -I#{path}"
7
+ }
8
+
9
+ opt.on('--with-png-lib=PATH', String) { |path|
10
+ $LDFLAGS << " -L#{path}"
11
+ }
12
+
13
+ opt.parse!(ARGV)
14
+ }
2
15
 
3
16
  have_library( "png16")
4
17
  have_header( "png.h")