MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / get_render

Function get_render

scripts/renders_update.py:76–86  ·  view source on GitHub ↗
(type_id)

Source from the content-addressed store, hash-verified

74
75
76def get_render(type_id):
77 fname = '{}.png'.format(type_id)
78 fullpath = os.path.join(export_dir, fname)
79 img = Image.open(fullpath)
80 if img.size != RENDER_SIZE:
81 img = crop_image(img)
82 img.thumbnail(RENDER_SIZE, Image.ANTIALIAS)
83 # Strip all additional image info (mostly for ICC color
84 # profiles, see issue #337)
85 img.info.clear()
86 return img
87
88
89if toremove:

Callers 1

renders_update.pyFile · 0.85

Calls 2

crop_imageFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected