summaryrefslogtreecommitdiff
blob: 766a4cbda24e1f6efa772df19c64933a267763ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
https://bugs.gentoo.org/545956

From c7e5dc617c7466c44935cdefbe7e79de319f98ca Mon Sep 17 00:00:00 2001
From: Pierre Joye <pierre.php@gmail.com>
Date: Sat, 17 Jan 2015 08:20:17 +0100
Subject: [PATCH]  fix #111, invalid default quantization

---
 src/gd_webp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gd_webp.c b/src/gd_webp.c
index fae3861..a3ae1ac 100644
--- a/src/gd_webp.c
+++ b/src/gd_webp.c
@@ -185,6 +185,9 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza
 		gd_error("gd-webp error: cannot allocate Y buffer");
 		return;
 	}
+	if (quantization == -1) {
+		quantization = 80;
+	}
 	vp8_quality = mapQualityToVP8QP(quantization);
 
 	U = Y + width * height;
-- 
2.3.5