Opened on 01/27/2015 at 02:01:47 PM
Closed on 01/27/2015 at 03:20:54 PM
Last modified on 01/27/2015 at 04:33:59 PM
#1883 closed defect (fixed)
Complex palette in new icons breaks Safari build
Reported by: | sebastian | Assignee: | sebastian |
---|---|---|---|
Priority: | P1 | Milestone: | |
Module: | Automation | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown | |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | ||
Review URL(s): |
http://codereview.adblockplus.org/5195120659922944 |
Description
How to reproduce
Run .build.py -t safari build
Observed behaviour
Traceback (most recent call last): File "./build.py", line 15, in <module> buildtools.build.processArgs('.', sys.argv) File "/home/sebastian/src/adblockpluschrome/buildtools/build.py", line 575, in processArgs commands[command](baseDir, scriptName, opts, args, type) File "/home/sebastian/src/adblockpluschrome/buildtools/build.py", line 43, in __call__ return self._handler(baseDir, scriptName, opts, args, type) File "/home/sebastian/src/adblockpluschrome/buildtools/build.py", line 197, in runBuild releaseBuild=releaseBuild, keyFile=keyFile) File "/home/sebastian/src/adblockpluschrome/buildtools/packagerSafari.py", line 233, in createBuild convertImages(params, files) File "/home/sebastian/src/adblockpluschrome/buildtools/imageConversion.py", line 119, in convertImages image = globals()['filter_' + filter](image, baseDir, *args) File "/home/sebastian/src/adblockpluschrome/buildtools/imageConversion.py", line 76, in filter_contrastToAlpha alpha.paste(image, mask=get_alpha(image)) File "/home/sebastian/src/adblockpluschrome/buildtools/imageConversion.py", line 27, in get_alpha table[transparency] = 0 TypeError: list indices must be integers, not str
This exception is raised because PIL can't parse the transparency from the palette of the new icons (#1535).
Expected behaviour
The build must not fail. The image conversion code must be able to process images with complex palette. It seems that this can easily be done by converting images with mode P (palette) to LA (grayscale + alpha).
Attachments (0)
Change History (4)
comment:1 Changed on 01/27/2015 at 02:04:19 PM by sebastian
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 01/27/2015 at 03:20:54 PM by sebastian
- Resolution set to fixed
- Status changed from reviewing to closed
comment:4 Changed on 01/27/2015 at 04:33:59 PM by sebastian
Note: See
TracTickets for help on using
tickets.
https://hg.adblockplus.org/buildtools/rev/9ef05ae8c504