Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!wuarchive!decwrl!adobe!heaven!glenn From: glenn@heaven.woodside.ca.us (Glenn Reid) Newsgroups: comp.lang.postscript Subject: Re: Printing bitmaps in postscript Message-ID: <201@heaven.woodside.ca.us> Date: 6 Jul 90 06:48:11 GMT References: <1990Jul5.172746.10305@dvinci.usask.ca> Reply-To: glenn@heaven.UUCP (Glenn Reid) Organization: Skyline Press, Woodside CA Lines: 37 In article <1990Jul5.172746.10305@dvinci.usask.ca> eric@dvinci.usask.ca (Eric Neufeld) writes: >I am experimenting with halftoning algorithms, i.e., don't necessary want >to use the screen built into postscript. Thus, I'm generating my >own bitmaps and printing them to an Apple postscript lasterwriter. > >But the printer frequently *just doesn't print* and leaves me no clues. > >Any ideas of where to start troubleshooting? I have checked my image >dimensions a zillion times, but I expect there is something simple that I >am missing. Except for the arguements to the image operator, the programs >are identical. You should read some sections from the "Green Book" (I forget which ones). Far and away the most common reason for the image not printing anything is the size of your image buffer (the innocent looking string that is often called "bufstr" or something similar. The simplest way to get good results is to make sure that this string exactly holds one scan line of your image. That requires a little bit of thought unless you have an 8-bit image, since the image string is in bytes and your image is in bits. If it's an 8-bit image, then the string should have one byte for each sample in the width of the image. If you should happen to use a larger string, for example, two scan-lines worth, then you have to have an even number of scan lines to avoid reading too much data and reading right through the end of the file. This is an oversimplified answer, but check out the discussion in the green book and check the length of your buffer string carefully. Send me note if you're still stuck. Glenn -- Glenn Reid PostScript/NeXT consultant glenn@heaven.woodside.ca.us Independent Software Developer ..{adobe,next}!heaven!glenn Unparalleled Quality