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

Avoid temp PS file in psconvert #1435

Closed
joa-quim opened this issue Aug 24, 2019 · 4 comments
Closed

Avoid temp PS file in psconvert #1435

joa-quim opened this issue Aug 24, 2019 · 4 comments
Labels
longterm Long standing issues that need to be resolved

Comments

@joa-quim
Copy link
Member

Thai massages are even better (and last longer) then morning showers, also in terms of inspiration.

But to the point. It always tickled me that we have to make an entire copy of the to-be-converted PS file that has only very small modifications. On the other hand, in a current ongoing thread of gs-devel mail list Chris said

‘An EPS file shouldn't call setpagedevice’

But that’s what we actually do when written EPS files. Don’t remember anymore why we do it, but maybe we don’t need it.

For simple raster conversions where only -A matters all turns out to update the BB to the right values, but it’s here that we shouldn’t need to create a temporary file only for that. Imagine that we start writing an extra comment line after the BB and HighRes BB that has something like

%%%ighRes BoundingBox: 0 0 0000000000000000 0000000000000

Then, with fseek we could replace the above line with the correct BB info and also comment the two precedent lines (that have the estimated BB by GMT) just by replacing the third char by a %. And that’s it (well, almost), this file is ready to be feed to gs to do the transform. And more, we can easily undo these changes after the gs job is done. The “almost” is because if we also have to deal with the Portrait vs Landscape rotation case then there probably something else to be taken care. But the same logic could be applied.

@seisman seisman added this to the 6.1.0 milestone Sep 13, 2019
@stale
Copy link

stale bot commented Dec 12, 2019

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the stale This will not be worked on label Dec 12, 2019
@seisman seisman removed the stale This will not be worked on label Dec 12, 2019
@stale
Copy link

stale bot commented Mar 11, 2020

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the stale This will not be worked on label Mar 11, 2020
@seisman seisman removed the stale This will not be worked on label Mar 11, 2020
@seisman seisman modified the milestones: 6.1.0, 6.2.0 Mar 25, 2020
@stale
Copy link

stale bot commented Jun 23, 2020

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@stale stale bot added the stale This will not be worked on label Jun 23, 2020
@seisman seisman added longterm Long standing issues that need to be resolved and removed stale This will not be worked on labels Jun 23, 2020
@seisman seisman removed this from the 6.2.0 milestone Apr 19, 2021
@joa-quim
Copy link
Member Author

Closing this as it's now addressed by #8417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
longterm Long standing issues that need to be resolved
Projects
None yet
Development

No branches or pull requests

2 participants