Removed unnecessary color parsing.
This commit is contained in:
@@ -28,7 +28,7 @@ import time
|
|||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from itertools import chain, product
|
from itertools import chain, product
|
||||||
|
|
||||||
from PIL import Image, ImageColor
|
from PIL import Image
|
||||||
|
|
||||||
from . import c_overviewer
|
from . import c_overviewer
|
||||||
from . import rendermodes
|
from . import rendermodes
|
||||||
@@ -1113,8 +1113,7 @@ class TileSet(object):
|
|||||||
# The viewer will fill in this missing tile with the default blank tile created in the
|
# The viewer will fill in this missing tile with the default blank tile created in the
|
||||||
# AssetManager, so there's no need to spend compute time on compressing and disk space
|
# AssetManager, so there's no need to spend compute time on compressing and disk space
|
||||||
# & network traffic on serving a blank image.
|
# & network traffic on serving a blank image.
|
||||||
transparent_color = ImageColor.getrgb(self.options['bgcolor']) + (0,)
|
if tileimg.getcolors() == [(147456, self.options['bgcolor'])]:
|
||||||
if tileimg.getcolors() == [(147456, transparent_color)]:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
# Create the directory if not exists
|
# Create the directory if not exists
|
||||||
|
|||||||
Reference in New Issue
Block a user