1

I use eps2eps command followed by pscol command which convert color eps to grayscale. But this combination remove white space around the figure (which is probably done by eps2eps command). Directly applying pscol on my original figure without eps2eps before does not work.

How to convert eps color figure into gray scale to have the same white space around?

  • Do you have a lot of images that need to be processed in this way? I ask because this can easily be done manually, but that's obviously no good if you have hundreds of images. – Ian Thompson Jul 14 '14 at 12:05
  • I have about 20 images. – Dejan Jul 14 '14 at 14:28
0

The white space around images stored in eps format is controlled by the bounding box and high resolution bounding box definitions, which appear near the top of the file, and look like this.

%%BoundingBox: 1 0 388 327
%%HiResBoundingBox: 1.100000 0.800000 387.249609 326.700000

For a small number of images, you can just open the files with a text editor and replace the bounding box definitions in the version produced by eps2eps with the definitions from the old file. Sometimes the high resolution bounding box will be absent, in which case just ignore this part and restore the bounding box to its original form.

|improve this answer|||||
  • I can change this numbers in version produced by eps2eps and it works. But, I cannot open original eps file with text editor to see original numbers. – Dejan Jul 14 '14 at 17:26
  • @Petar --- why not? – Ian Thompson Jul 14 '14 at 18:35
  • For example with gedit: gedit has not been able to detect the character encoding.Please check that you are not trying to open a binary file. Only the version produced by eps2eps I can open with gedit. – Dejan Jul 14 '14 at 18:49
  • @Petar --- that's weird. Can you make the file available for download and add a link to your question? – Ian Thompson Jul 14 '14 at 19:01
  • I menage to open with different text editor and solve the problem. The original file has some unreadable header, which is probably the reason why gedit detects this file as binary. – Dejan Jul 14 '14 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.