Merge "Fix crash when quantizing" into sc-dev am: c7b3b1b5bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13854175 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I257380277bd85b3f952a2c39d9b6b36df2ae1d26
This commit is contained in:
@@ -75,7 +75,7 @@ public class WSMeansQuantizer implements Quantizer {
|
||||
// Note: they don't _have_ to be ignored, for example, we could instead turn them
|
||||
// opaque. Traditionally, including outside Android, quantizers ignore transparent
|
||||
// pixels, so that strategy was chosen.
|
||||
int alpha = (pixel >> 24);
|
||||
int alpha = (pixel >> 24) & 0xff;
|
||||
if (alpha < 255) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user