Skip to content

Commit

Permalink
dpi kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
xrdaukar committed Feb 13, 2025
1 parent a6a2f0e commit 28ac53b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/oumi/utils/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def _check_pdf2image_dependency():

def load_pdf_pages_from_path(
input_pdf_filepath: Union[str, Path],
*,
dpi: int = _DEFAULT_PDF_DPI,
mode: str = DEFAULT_IMAGE_MODE,
) -> list[PIL.Image.Image]:
Expand Down Expand Up @@ -247,6 +248,7 @@ def load_pdf_pages_from_path(

def load_pdf_pages_from_bytes(
pdf_bytes: Optional[bytes],
*,
dpi: int = _DEFAULT_PDF_DPI,
mode: str = DEFAULT_IMAGE_MODE,
) -> list[PIL.Image.Image]:
Expand Down Expand Up @@ -285,7 +287,7 @@ def load_pdf_pages_from_bytes(


def load_pdf_pages_from_url(
pdf_url: str, dpi: int = _DEFAULT_PDF_DPI, mode: str = DEFAULT_IMAGE_MODE
pdf_url: str, *, dpi: int = _DEFAULT_PDF_DPI, mode: str = DEFAULT_IMAGE_MODE
) -> list[PIL.Image.Image]:
"""Loads PDF pages as PIL images from from PDF URL.
Expand Down

0 comments on commit 28ac53b

Please sign in to comment.