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