Skip to content

Commit

Permalink
Update webp_save function to include quality parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
TGS963 committed Apr 6, 2024
1 parent 86e18d2 commit a573eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webp_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ int webp_save(const char *filepath, int w, int h, int c, const unsigned char *pi
if (c == 3)
{
#if _WIN32
length = WebPEncodeBGR(pixeldata, w, h, w * 3, &output);
length = WebPEncodeBGR(pixeldata, w, h, w * 3, quality, &output);
#else
length = WebPEncodeRGB(pixeldata, w, h, w * 3, quality, &output);
#endif
}
else if (c == 4)
{
#if _WIN32
length = WebPEncodeBGRA(pixeldata, w, h, w * 4, &output);
length = WebPEncodeBGRA(pixeldata, w, h, w * 4, quality, &output);
#else
length = WebPEncodeRGBA(pixeldata, w, h, w * 4, quality, &output);
#endif
Expand Down

0 comments on commit a573eb3

Please sign in to comment.