Skip to content

Update pdf2image.py#289

Open
danielerizzoarchivi wants to merge 1 commit intoBelval:masterfrom
danielerizzoarchivi:master
Open

Update pdf2image.py#289
danielerizzoarchivi wants to merge 1 commit intoBelval:masterfrom
danielerizzoarchivi:master

Conversation

@danielerizzoarchivi
Copy link
Copy Markdown

I made a modification to the image handling in the code, specifically in the section that opens image files. Instead of using images.append(Image.open(...)) , I implemented a with statement to open the image.

By using the with statement, the image is automatically closed once the block of code is completed. This reduces the risk of having too many open files simultaneously, which could lead to operating system errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant