Skip to content

get_pixmap function takes too long to process #3450

@anirudhagarwal1

Description

@anirudhagarwal1

Description of the bug

When trying to create a pixmap for a PDF file, get_pixmap function takes too long even though the page size is well within the required limits.

pdf_in = fitz.open(stream=io.BytesIO(initial_bytes=pdf_bytes), filetype="pdf")
page = pdf_in[0]
pix = page.get_pixmap(alpha=False, dpi=150)

The step get_pixmap takes about 62 seconds to process on my macbook pro. Wanted to understand the reason why this takes so long and how can I bring down this time.

How to reproduce the bug

temp-6.pdf
This is the PDF file that I am using.

PyMuPDF version

1.24.2

Operating system

MacOS

Python version

3.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix developedrelease schedule to be determinedupstream bugbug outside this package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions