(type_id)
| 74 | |
| 75 | |
| 76 | def 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 | |
| 89 | if toremove: |
no test coverage detected