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