image_readers: premultiply alpha

This commit is contained in:
artemp
2014-11-21 11:28:56 +01:00
parent 1e9b6611cc
commit 4af232dcf3
2 changed files with 2 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ public:
unsigned width() const;
unsigned height() const;
inline bool has_alpha() const { return has_alpha_; }
bool premultiplied_alpha() const { return false; } //http://www.libpng.org/pub/png/spec/1.1/PNG-Rationale.html
bool premultiplied_alpha() const { return true; } // png_set_alpha_mode(png, PNG_ALPHA_PREMULTIPLIED, 2.2)
void read(unsigned x,unsigned y, unsigned width, unsigned height, char * image);
private:
void init();