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