def tile2WebPNG ( self, tile, color, brightness ):

    # 16 bit images map down to 8 bits
    if tile.dtype == np.uint16:
      tile = np.uint8(tile/256)

    # false color the image
    if tile.dtype != np.uint8:
      raise ("Illegal color option for data type %s" % ( tile.dtype ))
    else:
      tile = self.falseColor ( tile, color )

    img = Image.frombuffer ( 'RGBA', [self.tilesz,self.tilesz], tile.flatten(), 'raw', 'RGBA', 0, 1 )

    # enhance false color images when requested
    if brightness != None:
      # Enhance the image
      from PIL import ImageEnhance
      enhancer = ImageEnhance.Brightness(img)
      img = enhancer.enhance(brightness)

    return img
Error 301 -- also relocated (permanently).
dataset/ETHPy150Open neurodata/ndstore/django/catmaid/deprecated/colorcatmaid.py/ColorCatmaid.tile2WebPNG--crossover with--dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/win32/Python27/Lib/urllib.py/FancyURLopener.http_error_301