BTW, In the case of jpeg-files I finally switched to gimp's fu-script to convert pictures to groffable eps-files. Gimp seems to me as of very high quality.
I attached a pbm version of the script still leaving jpeg artifacts as comments. Further info of fu-script functions is provided by gimp's "Procedure Browser" under the help menu entry. Regards Holger On 07/05/2012 08:28 PM, Steve Izma wrote: > I'm using convert (from imagemagick) to crop and convert pbm > images into encapsulated postscript. When I prefix the output > filename with eps2: I get a very compact EPS file where the image > data is contained as binary like this: > > userdict begin > %%BeginData: 72200 Binary Bytes > DisplayImage > [a few lines of integers] > [72200 binary bytes, presumably] > %%EndData > end > > The resulting image is displayable (e.g., in okular), but when it > gets imported into groff with either .PSPIC or \X'ps: import ...' > only the first part of the binary gets cleanly imported into the > PostScript output (up to the first newline character) and the > rest becomes a series of ^M's -- which print black. > > I realize that up to now all the images I've been converting to > EPS for use in groff contain the image in ASCII format, but I was > hoping to reduce file size with this "convert" output. As far as > I can tell, the output conforms to PS LanguageLevel 2 (flagged by > the "eps2:" prefix in the convert commandline). > > Is there some other flag or option I've overlooked? > > Thanks, > -- Steve >
mkEpsFromPbm-gimp.sh
Description: Bourne shell script