Skip to content

Commit

Permalink
fix minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Nov 25, 2023
1 parent bc5fd65 commit 7067312
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pypdfium2/_helpers/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def render(
Removed the original process pool implementation and turned this into a wrapper for linear rendering, due to the serious conceptual issues and possible memory load escalation, especially with expensive receiving code (e.g. PNG encoding) or long documents.
"""

warnings.warn("The document-level pdf.render() API is deprecated and uncored due to serious issues in the original concept. Use page.render() and a caller-side loop or process pool.", category=DeprecationWarning)
warnings.warn("The document-level pdf.render() API is deprecated and uncored due to serious issues in the original concept. Use page.render() and a caller-side loop or process pool instead.", category=DeprecationWarning)

if not page_indices:
page_indices = [i for i in range(len(self))]
Expand Down
2 changes: 1 addition & 1 deletion src/pypdfium2/_helpers/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def render(


def _auto_bitmap_format(fill_color, grayscale, prefer_bgrx):
# TODO(apibreak) we'd like to also use BGRA if FPDFPage_HasTransparency(page) is True for performance reasons (see [1]), but this may break caller format expectations, and would make format selection document-dependant
# TODO(apibreak) we'd like to also use BGRA if FPDFPage_HasTransparency(page) is True for performance reasons (see [1]), but this may break caller format expectations, and would make format selection document-dependent
# [1]: https://chromium.googlesource.com/chromium/src/+/21e456b92bfadc625c947c718a6c4c5bf0c4c61b
if (fill_color[3] < 255):
return pdfium_c.FPDFBitmap_BGRA
Expand Down

0 comments on commit 7067312

Please sign in to comment.