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):


How to reproduce

Run -t safari build

Observed behaviour

Traceback (most recent call last):
  File "./", line 15, in <module>'.', sys.argv)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 575, in processArgs
    commands[command](baseDir, scriptName, opts, args, type)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 43, in __call__
    return self._handler(baseDir, scriptName, opts, args, type)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 197, in runBuild
    releaseBuild=releaseBuild, keyFile=keyFile)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 233, in createBuild
    convertImages(params, files)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 119, in convertImages
    image = globals()['filter_' + filter](image, baseDir, *args)
  File "/home/sebastian/src/adblockpluschrome/buildtools/", line 76, in filter_contrastToAlpha
    alpha.paste(image, mask=get_alpha(image))
  File "/home/sebastian/src/adblockpluschrome/buildtools/", 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:3 Changed on 01/27/2015 at 04:14:41 PM by sebastian

  • Review URL(s) modified (diff)

comment:4 Changed on 01/27/2015 at 04:33:59 PM by sebastian

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sebastian.
Note: See TracTickets for help on using tickets.