Example #1
0
 def __init__(self, tiled_image):
    from tiled_image import TiledImage
    assert isinstance(tiled_image, TiledImage);
    Tiler.__init__(self, tiled_image)
    
    self.tile_path  = tiled_image.image_path
    self.background = tiled_image.background
Example #2
0
 def __init__(self, tiled_image, source_path):
    from tiled_image import TiledImage
    assert isinstance(tiled_image, TiledImage);
    Tiler.__init__(self, tiled_image)
    
    self.tile_path  = tiled_image.image_path
    self.background = tiled_image.background
    self.source_path = source_path
    self.source_image = Image.open(source_path)
    print "Tiling: %s as: %s" % (source_path, self.tile_path)
    print "Format: %s, Size: %s, Mode: %s" % (
             self.source_image.format, self.source_image.size, self.source_image.mode)