Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added gs_binary to control Ghostscript use on all platforms #7392

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

radarhere
Copy link
Member

Resolves #7391

The user in that issue would like an API to prevent Ghostscript use. Since we already have EpsImagePlugin.gs_windows_binary that stores the name of the Ghostscript binary on Windows,

gs_windows_binary = None

this PR suggests adding EpsImagePlugin.gs_binary, that stores the name of the Ghostscript binary on all platforms.

Setting it to false would result in OSError: Unable to locate Ghostscript on paths when trying to load an EPS image.

@@ -88,8 +88,14 @@ in ``L``, ``RGB`` and ``CMYK`` modes.
Loading
~~~~~~~

To use Ghostscript, Pillow searches for the "gs" executable. On Windows, it
also searches for "gswin32c" and "gswin64c". If you would like to customise
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit more concise:

Suggested change
also searches for "gswin32c" and "gswin64c". If you would like to customise
also searches for "gswin32c" and "gswin64c". To customise

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I've pushed a commit so that I could rearrange the lines ending as well, and shortened another bit of text later on.

@hugovk hugovk merged commit 0a43254 into python-pillow:main Oct 5, 2023
@radarhere radarhere deleted the eps branch October 5, 2023 21:28
radarhere added a commit to radarhere/Pillow that referenced this pull request Oct 7, 2023
hugovk added a commit that referenced this pull request Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a documented way to turn off EPS handling via Ghostscript
2 participants