-
Notifications
You must be signed in to change notification settings - Fork 360
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
Comments
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. |
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. |
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. |
Closing this as it's now addressed by #8417 |
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.
The text was updated successfully, but these errors were encountered: