Tuesday, February 5, 2008
compressing text images
i was playing around with potrace and found it to be ideal for compressing images of text. (i tried autotrace, too, but i couldn't get it working well within 2 minutes and gave up.) based on settings from the example page, here are some good defaults to try:
mkbitmap -s 2 -t 0.48 test.eps
if the image is blurry or has too many colors, you might want to add '-f 2' to the mkbitmap options to make it do a high-pass filter. only problem with that is, it will mess up graphics.
the above options worked really well for an image that was about 2000 pixels across a page of text. the eps file was only about 1/10 the size of the pbm, which was only about 1/5 the size of the original ppm. and it still looks great -- very readable.
apparently inkscape uses potrace and allows color instead of just b&w. maybe i can figure out how to pipe through that...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment