Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def analysis_process(pdf_file):
|
|
13 |
# Render the page to a pixmap
|
14 |
pix = page.get_pixmap()
|
15 |
# Save the pixmap as an image
|
16 |
-
image = Image.frombytes("RGB", [
|
17 |
image_path = "first_page.jpg"
|
18 |
image.save(image_path)
|
19 |
|
|
|
13 |
# Render the page to a pixmap
|
14 |
pix = page.get_pixmap()
|
15 |
# Save the pixmap as an image
|
16 |
+
image = Image.frombytes("RGB", [pix.width, pix.height], pix.samples)
|
17 |
image_path = "first_page.jpg"
|
18 |
image.save(image_path)
|
19 |
|