Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,9 @@ def generate_pdf(images_with_sequence):
|
|
20 |
|
21 |
pdf = FPDF()
|
22 |
for i, (image, _) in enumerate(images_with_sequence):
|
23 |
-
image.
|
|
|
|
|
24 |
pdf.add_page()
|
25 |
pdf.image(f"temp_image_{i}.jpg", x=10, y=10, w=190)
|
26 |
|
|
|
20 |
|
21 |
pdf = FPDF()
|
22 |
for i, (image, _) in enumerate(images_with_sequence):
|
23 |
+
if image.mode != 'RGB':
|
24 |
+
image = image.convert('RGB')
|
25 |
+
image.save(f"temp_image_{i}.jpg", "JPEG")
|
26 |
pdf.add_page()
|
27 |
pdf.image(f"temp_image_{i}.jpg", x=10, y=10, w=190)
|
28 |
|