Re: [Groff] ps: import of an EPS file with binary data

2012-07-07 Thread Holger Herrlich
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 "

Re: [Groff] ps: import of an EPS file with binary data

2012-07-06 Thread Ralph Corderoy
Hi Tadziu, > (But it should have given you a "Not a raw PPM" error, because raw > PBMs have a magic number of "P4" instead of "P6"). (Given the OP said bitmaps originally but passed the P6 test I assumed he'd done something like `convert foo.pbm ppm:' which left the maxval at 1.) I agree, sticki

Re: [Groff] ps: import of an EPS file with binary data

2012-07-06 Thread Tadziu Hoffmann
> Is there an option to resize and crop the input image? No, it is only intended to encapsulate image data in Postscript. > That's the main reason I'm trying to use convert, which works > with grops if I don't try to reduce file size with the eps2: > flag. The "netpbm" package has lots of utili

Re: [Groff] ps: import of an EPS file with binary data

2012-07-06 Thread Tadziu Hoffmann
> > The above gs commandline works on other images I've tried, > > but when I run it on the set at hand, I get a "MAXVAL not > > 255" error. > > Take your PBM files and produce a 255-maxval PPM that > ppmtops.ps demands Sorry, no, I advise against that. The "ppmtops.ps" I posted I had just put

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Ralph Corderoy
Hi Steve, > On Fri, Jul 06, 2012 at 12:30:44AM +0200, Tadziu Hoffmann wrote: > > gs -q -dNODISPLAY -dBATCH -dNOPAUSE ppmtops.ps teapot.ps > > The above gs commandline works on other images I've tried, but when I > run it on the set at hand, I get a "MAXVAL not 255" error. Take your PBM files a

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Ralph Corderoy
Hi, Werner wrote: > Hmm. According to the source code of grops, binary sections in > imported files are supported. So it really looks like a bug. Can you > provide a small example? This trivial case seems to work OK for me. The EPS has binary as does the PS and diff says the line of binary is

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Steve Izma
On Fri, Jul 06, 2012 at 12:30:44AM +0200, Tadziu Hoffmann wrote: > Subject: Re: [Groff] ps: import of an EPS file with binary data > > convert teapot.ppm teapot.eps2 > gs -q -dNODISPLAY -dBATCH -dNOPAUSE ppmtops.ps teapot.ps There must be a problem with the set of images I&

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Tadziu Hoffmann
> 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: [snip] Okay, I just completed a few tests and my conclusion

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Werner LEMBERG
>> 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

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Schindler Patrik
Hi Steve, Am 05.07.2012 um 20:28 schrieb Steve Izma: 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 begi

Re: [Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Tadziu Hoffmann
> 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

[Groff] ps: import of an EPS file with binary data

2012-07-05 Thread Steve Izma
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