Skip to content

xxmawhu/epstool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epstool

function

A tool cut the black margin of eps figure

How

Base on gs

  • first, get the bounds of the eps figure using the following command
gs -dNOPAUSE -dBATCH -q -sDEVICE=bbox fileName.eps 

The output is, i.e

%%BoundingBox: 0 1 258 167
%%HiResBoundingBox: 0.594000 1.224000 257.140820 166.921800 
  • Then, replace the BoundingBox with the output value, usually lying at the first 3 lines of the eps figure.

Usage

  • set up the environment
source setup.sh
  • Cut Cut Cut
epstool fileName.eps

PNG

convert source.png -gravity SouthEast -background white -splice 0x0  -background
black -splice 0x0 -fuzz 5%% -trim  +repage -chop 0x0 mks.png

About

A tool cut the black margin of eps figure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published