(path)
| 25 | |
| 26 | |
| 27 | def pil_loader(path): |
| 28 | # open path as file to avoid ResourceWarning (https://github.com/python-pillow/Pillow/issues/835) |
| 29 | with open(path, 'rb') as f: |
| 30 | img = Image.open(f) |
| 31 | return img.convert('RGB') |
| 32 | |
| 33 | |
| 34 | def default_loader(path): |