Skip to content

Memory leak in page.getPixmap() #130

Closed
@thefloe1

Description

@thefloe1

I'm using pymupdf to loop though all pages in a PDF and extracting pages from it:

doc = fitz.open(filename)
for num,page in enumerate(doc):
	pix = page.getPixmap(m)
	data = pix.getPNGData()	
	# doing some magic here

Using memory profiler I see that every loop getPixmap allocates 20MB of data which are not freed. I tried different things like del pix or gc.collect but the memory usage increases every run. As I'm handling quiet some pages, my scripts runs out of memory...

getPixmap also shops the following warning/error:

error: Unable to read ICC workflow
warning: Attempt to read Output Intent failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions