diff --git a/imageio/webpdec.c b/imageio/webpdec.c index f49a91a9..06c72baa 100644 --- a/imageio/webpdec.c +++ b/imageio/webpdec.c @@ -9,6 +9,10 @@ // // WebP decode. +#ifdef HAVE_CONFIG_H +#include "webp/config.h" +#endif + #include "./webpdec.h" #include @@ -162,7 +166,11 @@ int ReadWebP(const uint8_t* const data, size_t data_size, break; } if (pic->use_argb) { +#ifdef WORDS_BIGENDIAN + output_buffer->colorspace = MODE_ARGB; +#else output_buffer->colorspace = MODE_BGRA; +#endif output_buffer->u.RGBA.rgba = (uint8_t*)pic->argb; output_buffer->u.RGBA.stride = pic->argb_stride * sizeof(uint32_t); output_buffer->u.RGBA.size = output_buffer->u.RGBA.stride * pic->height;