summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJames O'Leary <jamesoleary@google.com>2021-03-11 13:43:20 -0500
committerJames O'Leary <jamesoleary@google.com>2021-03-11 13:43:20 -0500
commit9b9276849b3bb9b57900f21f90e98e6f330536ef (patch)
treed3516afe07163be098ea0cbd29d383b03a994eba /tools/aapt2/java/JavaClassGenerator_test.cpp
parentfbbb5dd5cade7c9f775bff25a20dbc99ec74303e (diff)
Ignore transparent pixels during WSMeans
The WSMeans quantizer uses starting clusters from a Wu quantizer as starting points for an optimized Kmeans algorithm. The first thing the quantizer does is assign pixels from the image being quantized to those starting clusters. Either due to the image source or downscaling, transparent pixels may be in the pixels. Filter those out: they create misleading results, such as there being two colors in the image, semi-transparent black and green, in a wallpaper that is solid green by all accounts. Fixes: 182333325 Test: atest CtsAppTestCases:android.app.cts.WallpaperColorsTest#fromDrawableTest passes locally on sunfish. link: http://ab/I26300007868608112 Change-Id: Icaebd98eeba27d3dc59a698282dd3be03fce1bf9
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions