Skip to content

Commit

Permalink
testing different versions
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Feb 1, 2019
1 parent 5e65181 commit ef2ff7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ before_install:
- export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$HOME/opt/lib
- export CPATH=$CPATH:$HOME/opt/include


rvm:
- 2.0
- 2.1
Expand All @@ -19,6 +18,9 @@ rvm:
- rbx-19mode
- ruby-head
- jruby-head
env:
- LIBWEBP_VERSION=0.4.0
- LIBWEBP_VERSION=1.0.2

cache: bundler
sudo: false
Expand Down
2 changes: 1 addition & 1 deletion ext/webp_ffi/webp_ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int webp_encode(const char *in_file, const char *out_file, const FfiWebpEncodeCo
if (encode_config->lossless == 0 || encode_config->lossless == 1){
config.lossless = encode_config->lossless;
}
if (encode_config->near_lossless >= 0 && encode_config->near_lossless <= 100){
if (WebPGetEncoderVersion() >= 0x010000 && encode_config->near_lossless >= 0 && encode_config->near_lossless <= 100){
config.near_lossless = encode_config->near_lossless;
config.lossless = 1; // use near-lossless only with lossless
}
Expand Down
6 changes: 3 additions & 3 deletions spec/travis_build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#/usr/bin/env sh
wget http://downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
tar xvzf libwebp-1.0.2.tar.gz
cd libwebp-1.0.2
wget http://downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP_VERSION.tar.gz
tar xvzf libwebp-$LIBWEBP_VERSION.tar.gz
cd libwebp-$LIBWEBP_VERSION
./configure --prefix=$HOME/opt
make && make install

0 comments on commit ef2ff7d

Please sign in to comment.