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

Support EPS format #417

Open
ab192130 opened this issue Apr 28, 2024 · 2 comments
Open

Support EPS format #417

ab192130 opened this issue Apr 28, 2024 · 2 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@ab192130
Copy link

ab192130 commented Apr 28, 2024

Hey everyone!

First off, thanks a bunch for this super cool open source project! You guys rock!

I would like to know if weserv supports EPS format (Encapsulated PostScript). The FAQ mentions that it unofficially supports ALL image extensions of imagemagick.

And I've tested it with a sample.eps file: https://files.catbox.moe/1szxcf.eps.
I've tested it with my S3 link either.

The response I get is:
{"status":"error","code":404,"message":"Image not readable. Is it a valid image?"}

Is it really supports EPS, if not, can we implement it? Or am I doing something wrong?
I need it for my project so bad.

Have a great day ☀

@kleisauke kleisauke added enhancement New feature or request wontfix This will not be worked on labels Apr 29, 2024
@kleisauke
Copy link
Member

ImageMagick delegates PostScript interpretation by shelling out to the Ghostscript command-line tool. That means that rendering an EPS image is now a many-stage process: the EPS buffer is copied to a temporary image file in /tmp, Ghostscript is executed with a set of command-line flags to render the document out to an image file in /tmp, this temporary image file is read back in again, and finally the image is converted into the desired output format.

Obviously shelling out to an external program and passing the image back in via a temp file is pretty inefficient, which is one of the main reasons we disabled this format on our public service. Furthermore, Ghostscript is licensed under the restrictive AGPL licence, which means that any software linked to it must also be licensed under the AGPL.

@ab192130
Copy link
Author

Thanks for the detailed explanation! This clarifies the EPS rendering process and the reasoning behind disabling the format.

There seems to be a lack of information about using ImageMagick with custom microservices. I'm going to do some deeper research on this topic and see if I can build one myself. Thanks again 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Development

No branches or pull requests

2 participants