Skip to content

Commit

Permalink
BUG Fix WebP loading
Browse files Browse the repository at this point in the history
WebP had not been updated to the newer API
  • Loading branch information
luispedro committed Oct 14, 2014
1 parent 072fe41 commit d5d6691
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Version 0.4+
* Add magic-number based format auto-detection
* Auto detect whether webp is installed
* Fix WebP reading (update to newer API)

Version 0.4 2014-07-21 by luispedro
* Add configuration for TIFF saving
Expand Down
4 changes: 2 additions & 2 deletions imread/lib/_webp.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 Luis Pedro Coelho <luis@luispedro.org>
// Copyright 2012-2014 Luis Pedro Coelho <luis@luispedro.org>
// License: MIT (see COPYING.MIT file)

#include "base.h"
Expand All @@ -7,7 +7,7 @@

#include <webp/decode.h>

std::auto_ptr<Image> WebPFormat::read(byte_source* src, ImageFactory* factory) {
std::auto_ptr<Image> WebPFormat::read(byte_source* src, ImageFactory* factory, const options_map&) {
std::vector<byte> data = full_data(*src);
int w, h;
int ok = WebPGetInfo(&data[0], data.size(), &w, &h);
Expand Down
2 changes: 1 addition & 1 deletion imread/lib/_webp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class WebPFormat : public ImageFormat {
bool can_read() const { return true; }
bool can_write() const { return false; }

std::auto_ptr<Image> read(byte_source* src, ImageFactory* factory);
std::auto_ptr<Image> read(byte_source* src, ImageFactory* factory, const options_map&);
};

#endif // LPC_WEBP_H_INCLUDE_GUARD_

0 comments on commit d5d6691

Please sign in to comment.