| Conditions | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/python |
||
| 35 | def generate_small_jpg(self): |
||
| 36 | """Generate a rather small jpg file to upload faster(631 bytes) |
||
| 37 | |||
| 38 | :return: |
||
| 39 | """ |
||
| 40 | file_path = os.path.join(self.directory, str(uuid4()) + ".jpg") |
||
| 41 | im = Image.new("RGB", (self.SAUCENAO_MIN_WIDTH, self.SAUCENAO_MIN_HEIGHT)) |
||
| 42 | im.save(file_path, "JPEG") |
||
| 43 | return file_path |
||
| 44 | |||
| 59 |