From 06e8e900188429b842550f7c17d0a1b12349db3c Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Tue, 14 Aug 2012 14:26:11 -0700 Subject: [PATCH] Prevent color dithering of firmware bitmaps BUG=None TEST=Run 'make' in newbitmaps dir with "clean" removed from the default step in the Makefile. Use bitmap_viewer to check that the images do not show grainy color dithering. Change-Id: I6dff41338a7e54d090bb2f6dedb982fdaa31e657 Reviewed-on: https://gerrit.chromium.org/gerrit/30308 Reviewed-by: Hung-Te Lin Commit-Ready: Dave Parker Tested-by: Dave Parker --- scripts/newbitmaps/images/build_images | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/newbitmaps/images/build_images b/scripts/newbitmaps/images/build_images index 375bd2ccb0..269d5e6c5a 100755 --- a/scripts/newbitmaps/images/build_images +++ b/scripts/newbitmaps/images/build_images @@ -53,7 +53,8 @@ convert_to_bmp3() { # TODO(hungte) Find a better way to decide if PIL is required. Unfortunately, # ImageMagic identify "%z" is not always what we're looking for... local fn="$folder/$output" - python -c "import Image; Image.open('$fn').convert('P').save('$fn')" + local param="'P', dither=None, palette=Image.ADAPTIVE" + python -c "import Image; Image.open('$fn').convert($param).save('$fn')" } main() {