diff --git a/issuu2epub.py b/issuu2epub.py index a5ac0cc..db68174 100644 --- a/issuu2epub.py +++ b/issuu2epub.py @@ -86,9 +86,9 @@ def convert_image(image_path: Path) -> io.BytesIO: img.thumbnail(max_image_size, Image.Resampling.LANCZOS) img_byte_arr = io.BytesIO() img.save(img_byte_arr, format="JPEG", optimize=True, quality=target_quality) - img_byte_arr.seek(0) + img_byte_arr = img_byte_arr.getvalue() # type: ignore[assignment] - return img_byte_arr + return img_byte_arr # type: ignore[return-value] def generate_epub(