Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!hplabs!hpfcso!rrd From: rrd@hpfcso.HP.COM (Ray Depew) Newsgroups: comp.sys.handhelds Subject: Re: How does one print out a GROB from a PC? Message-ID: <7360058@hpfcso.HP.COM> Date: 25 Jan 91 15:42:04 GMT References: <1991Jan24.182436.20395@rick.cs.ubc.ca> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 38 George, If you're wanting to print grobs on a Mac, then it's a cinch. You just have to pick up the GROBber from the HPBBS. If you're wanting to print grobs on an MS-DOS machine, it's almost as easy, except that you say you have no way to play with graphics on your machine. The program GROB2TIF.EXE on the HPBBS allows you to convert GROBs to TIFF files. TIFF files can be imported by any decent word-processing program (insult to other WP's was intentional) and printed in the documents thus created. It's not hard to write a program on your PC that will convert a grob to printer control commands, and print it out directly. It's just that nobody has bothered doing it yet. Since you have until the 30th to complete your assignment, you have time. It should take you a couple of hours on Saturday, with nobody around to interrupt you. Basically, the program is just string manipulation. When you transfer the grob to the PC in ASCII mode, you get a string of the form GROB x y bitmap where 'x' is the width in pixels, 'y' is the height in pixels, and 'bitmap' is a hex bitmap of the grob, row by row. Bear in mind: 1) The 48 rounds each row bitmap up to a multiple of 8 bits. If your grob is 11 pixels wide, the 48 will use 16 bits (or 2 bytes, or 4 characters) to define each row. 2) Each nybble in the bitmap is backwards from what you think it should be. This means that the pixel pattern 1100, or hex C, is represented in the grob bitmap as hex 3, or what should be 0011. Knowing this, you should be able to translate all nybbles: 0 stays 0, 1 becomes 8, 2 becomes 4, et cetera. Like I said, a good Saturday afternoon project. Good luck. Ray rrd@hpfitst1.hp.com Disclaimer: Hey, I don't make 'em, I just use 'em, same as you.