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:
James O'Leary
2021-03-12 21:27:34 +00:00
committed by Automerger Merge Worker

View File

@@ -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;
}