Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def create_images(base_svg_path=SVG_PATH, rc_path=RC_PATH,
palette=DarkPalette):
"""Create resources `rc` png image files from base svg files and palette.
Search all SVG files in `base_svg_path` excluding IMAGE_BLACKLIST,
change its colors using `palette` creating temporary SVG files, for each
state generating PNG images for each size `heights`.
Args:
base_svg_path (str, optional): [description]. Defaults to SVG_PATH.
rc_path (str, optional): [description]. Defaults to RC_PATH.
palette (DarkPalette, optional): Palette . Defaults to DarkPalette.
"""
# Needed to use QPixmap
_ = QApplication([])
def create_palette_image(base_svg_path=SVG_PATH, path=IMAGES_PATH,
palette=DarkPalette):
"""
Create palette image svg and png image on specified path.
"""
# Needed to use QPixmap
_ = QApplication([])
base_palette_svg_path = os.path.join(base_svg_path, 'base_palette.svg')
palette_svg_path = os.path.join(path, 'palette.svg')
palette_png_path = os.path.join(path, 'palette.png')
_logger.info("Creating palette image ...")
_logger.info("Base SVG: %s" % base_palette_svg_path)
_logger.info("To SVG: %s" % palette_svg_path)
_logger.info("To PNG: %s" % palette_png_path)