gdh@raider.MFEE.TN.US (Gordon Hull) (12/13/88)
Does anybody know of a quick way to enhance a screen image before printing? I've got a program that prints out CGA screens; I'd like for it to be able to smooth out the "jaggies" in the image before I print it. I know this can be done, since Pizzaz does it. Basically, the only requirement is that it take the low-res (320x200 or 640x200, it doesn't matter which) screen and convert it to the higher resolution printer image, while smoothing the picture. The actual resolution conversion is pretty easy, and I've got it scaling the picture to different sizes, but I'd really like to be able to do some enhancement of the image. I speak assembler (PC), Pascal, Modula-2, and QuickBASIC; you could persuade me to read a 'C' listing if you had one :-) Please E-mail replies, as I've been known to miss articles on the net (I'll summarize if respone warrants it). Thanks... -- --- Gordon Hull Internet: gdh@raider.MFEE.TN.US Uucp: ..killer!raider!gdh Gordon_Hull@oraider.FIDONET.ORG FIDO: 1:116/9 Flames: ..!nether!inferno!lowest!circle!asmodeus (or ..!file13)
GRANGERG@VTVM1.BITNET (Greg Granger) (12/21/88)
Well I'm certainly no expert on this but if all you are trying to do is 'smooth the jaggies', I think I can help. Consider the pixels in the original (screen) image. Any one (except those on the border) can be connected to 8 other pixels. When these are converted for the printer (ie enlarged) the pixels to the "right and left" and "top and bottom" give smooth lines, only the pixels connected on the diagonals cause problems. Since every screen pixel is converted to several printer pixels the diagonal jumps are exaggerated. This can be offset by plotting a extra point between all points connected diagonally. I'll try to make this even more unclear :-) by 'drawing' a picture. +----+----+ +----+----+ +----+----+ +----+----+----+ xxxx xxxx +----+----+----+----+ +----+----+----+----+ xxxx xxxx +----+----+ +----+----+----+ +----+----+ +----+----+ Unsmoothed printer pixels Smoothed printer pixels by insertions of extra point It's a bit tricker for the 320x200 CGA mode because generally color is simulated by using a pattern, and you wouldn't want to mess up the pseudo-colors by overlaying a extra point on them. This BTW is similar to what they do with CD players (2x, 4x, 8x oversampling) to 'improve' there sound. Greg