home *** CD-ROM | disk | FTP | other *** search
- Some notes about screen dumps
-
- Written by Michael Day 25 July 1988
-
-
-
- First, display screens are less accurate than printers. The
- sizes can vary even when the screen is specified as the same
- size. Further, the adjustments of the screen can affect size and
- aspect ratio.
-
- A standard 12 inch monitor will provide a display area of
- around 20cm by 15cm (or 8" by 6"). This provides an aspect ratio
- of 4:3. In order for the printout to look the same as the screen,
- it is important that the aspect ratio on the printer be the same
- as the screen.
-
- Although the overall screen aspect ratio normally stays
- around 4:3, the pixel aspect ratio can change depending on the
- mode selected. As an example, consider a CGA color graphics
- screen which displays 320x200 pixels. This means that there are
- 40 pixels per inch horizontally, and 33.33 pixels per inch
- vertically. This gives the pixels an aspect ratio of 2.5:3.
- Meaning that if we were to magnify a single pixel large enough it
- would be 2.5 inches wide by 3 inches tall.
-
- When we switch the screen to the monochrome graphics mode we
- get 640x200 pixels on the screen. This means that the pixel
- aspect ratio is now 1.25:3. The pixel has shrunk in half in the
- horizontal direction, but remained the same in the vertical
- direction.
-
- The pixel aspect ratio is also affected when other modes or
- displays are used, such as 640x350 for EGA, 640x480 for VGA, or
- 720x348 for Hercules.
-
- Note: When we say that the pixel aspect ratio is 2.5:3, that is
- describing the area allocated on the screen to the pixel, and not
- the actual spot size of the electron beam. Case in point, on the
- CGA display, the pixel definition is crowded so close together in
- the horizontal direction that on most displays the dots overlap,
- but in the vertical direction the spot size is too small to
- completely fill in the area between the dots. On the VGA display
- this is corrected by double scanning (scanning two display lines
- for every CGA line). This effectively doubles the spot size in
- the vertical direction to fill in the gaps between the CGA lines.
-
-
- The spot size on a display is usually referred to as
- "pitch", and the allocated display area is usually referred to as
- a "pixel". The pitch size is a function of the monitor. The pixel
- size is a function of the display card.
-
-
-
- The printer:
-
- On the printer we have similar problems. The printer's
- aspect ratio is usually not the same as the display's aspect
- ratio, so some correction must be done if proper aspect ratio is
- to be maintained. Without proper aspect ratio, circles on the
- display will come out as ovals on the printer.
-
- The Epson printer is the most common printer used in
- conjunction with the PC. This is because it is the printer that
- IBM selected to provide with their computer.
-
- In it's "normal" graphics mode the Epson printer will print
- 60 dots per inch horizontally, and 72 dots per inch vertically.
- The resolution of 72 dots per inch vertically was chosen because
- character size is measured in "points" and a point is defined as
- being 1/72 inch.
-
- The position of the wires in the print head determine the
- vertical resolution, and since they are fixed at 1/72 inch apart,
- the vertical resolution is fixed at 1/72 inch.
-
- It is possible to simulate a higher resolution by moving the
- paper slightly and printing a second pass over the line that was
- just printed. The Epson provides for this with the ESC 3 command
- which causes the printer to advance the paper by the specified
- n/216 inch increment when a line feed is received. However, this
- means that three passes for each line must be used to obtain this
- resolution, which slows printing down by a factor of three. Thus
- it is not often used.
-
- Another alternative is to use a 24 pin printer which uses
- three rows of 8 pins to achieve the same effect on a single pass.
-
- In the horizontal direction the printer resolution can
- change depending on the mode selected. In normal graphics mode on
- the Epson this is set to 60 dots per inch. The reason behind this
- is quite simple, the normal resolution of a character printed in
- 10 pitch on the Epson is 6 dots horizontally (discounting the
- half dot fudging Epson uses to boost apparent resolution). The
- paper used is usually eight inches wide, and to fit eighty
- characters onto the line at 6 dots per character area you end up
- with 480 dots on the line, or 60 dots per inch.
-
- Six (five active pixels plus one separator) is the minimum
- number of pixels wide that can be used to fully represent all the
- ASCII characters.
-
-
-
-
-
-
-
-
- As was mentioned, the Epson has a half dot fudge which
- allows it to put twice as many dots on the same line. It does
- this by simply moving the head only half as far to print the next
- dot. By selecting double density mode you can get 120 dots per
- inch which gives you a resolution of 1/120 inch. This doesn't
- come free. In order to print twice as many dots on a line, the
- printer has to print twice as many dots. That means that it will
- be slower.
-
- The reason it is slower is because it takes a finite period
- of time to move the print wires in the head. Enough time must be
- allowed for the wires to retract in preparation for the next
- print. The 'fudge' in character mode printing is that the dots
- are specified in such a way that there are no two consecutive
- half dots in a row, thus giving enough time for the wire to
- retract without having to slow the printer down. But since in
- graphics mode the printer can't know ahead of time whether there
- will be any consecutive half dots, it must assume that there will
- be if you select the double density mode.
-
- Selecting double density mode does not mean that the printer
- will slow down to half print speed, there are other factors that
- come into play that control this, including head return time, and
- line feed time.
-
- In later model printers there is also an added super density
- mode which allows four dots to be printed in the space of one.
- And on some 24 pin printers there is even a "hex" density mode,
- allowing for 360 dots per inch resolution. The printer handles
- this by adding some intelligence in the printing. If the previous
- dot was printed then it will not print the next one even if told
- to. That way there is enough time for the wire to be retracted in
- preparation for the following dot. This allows the printer to
- print 240 dots per inch resolution or more while running at 120
- dots per inch speed. Since most programs try to be compatible to
- the original Epson MX-80 printer, the super density mode is
- seldom used.
-
-
- Printer aspect ratio:
-
- As was previously mentioned, the Epson printer does not have
- the same aspect ratio as the display, though there are tricks
- that can be used to restore the over all image aspect ratio. This
- is performed by printing additional dots at certain times to
- change the apparent pixel aspect ratio of the printer. With the
- exception of the CGA display, the translation is usually not
- perfect.
-
- There are two ways in which the display can be printed.
- normal 'upright' mode, in which the display's horizontal axis
- appears on the printer's horizontal axis. And 'landscape' mode
- where the display is printed out sideways.
-
-
- A normal upright printout will provide an image that is the
- same size and orientation as the display, but has the
- disadvantage of requiring a lot of fiddling with the dots to
- produce the printout.
-
- The landscape (or sideways) printout does not require as
- much fiddling, but causes the picture to grow slightly in size
- (8.9" x 6.7" instead of 8" x 6"). A real big advantage is with
- the CGA display mode. When printing a CGA display sideways all
- that needs to be done is to double the display's horizontal scan
- lines on the printer for 640x200 mode, or double it in both
- directions in 320x200 mode. The printout will come out with the
- proper aspect ratio.
-
- The CGA display could be printed upright without any bit
- twiddling at all, but the aspect ratio will be way off, and the
- picture would be smaller. By bit twiddling it is possible to
- restore the picture to the same size as the display (8"x6"), but
- there will be some distortion at the pixel level of the printout.
-
- With Hercules, EGA, and VGA type displays it is normally not
- possible to perform a screen dump without some distortion.
-
- If it is important that the picture fit the 8"x6" display
- format then the upright display method should be used, but you
- should realize that there will be significant distortion at the
- pixel level to keep the aspect ratio the same.
-
- If minimal distortion at the pixel level is desired, then
- the landscape method should be used. The primary disadvantage is
- that the picture size will grow slightly (8.9"x6.7") in order to
- achieve the reduced distortion. Also note that the Hercules
- display will grow even further, expanding to 10"x7.5" to achieve
- the reduced pixel distortion.
-
- While it is possible to achieve the same display size in the
- landscape mode, there is no reason to do so since it would end up
- being even more distorted at the pixel level than the upright
- mode.
-
- The amount of pixel level distortion is a trade off of speed
- verses distortion. It is possible to achieve minimal distortion
- by selecting the super resolution mode and using six print passes
- per line. However that will cause the print time to be increased
- by a factor of six. This is seldom acceptable given that the
- print time in normal mode is too slow as it is.
-
- One final note on speed. The print time for a given mode is
- based entirely on how much data there is to print. The larger the
- picture, the longer it will take to print it.
-
-
-
-
-
- Scaling distortion:
-
- When scaling occurs, there will be trade-offs as a result.
- And since in the normal course of events when doing a screen dump
- scaling will occur, you will normally be encountering these
- trade-offs. The trade-offs cause distortion of the picture in
- one form or another.
-
- The two main forms of distortion are aspect ratio, and pixel
- distortion. When scaling down there is also an additional
- degradation caused by screen pixel data being lost.
-
- Aspect ratio distortion is where the overall picture ratio
- on the printer does not match the ratio provided on the screen.
- Sometimes this is intentional, but usually it is not desired. For
- engineering graphs, aspect ratio errors greater than 2% are
- considered unacceptable. For business charts aspect ratio errors
- greater than 5% begin to become unacceptable. In all cases aspect
- ratio errors greater than 10% usually are considered unacceptable
- as the picture will be noticeably distorted.
-
- There are times when it might be desirable to exceed the
- aspect ratio error factor. This might be done if the pixel level
- distortion is considered unacceptable.
-
- Pixel level distortion is most noticeable in the printer's
- Y (vertical) direction. This is because each distortion
- increment is 1/72 inch. This is readily noticeable. Sometimes
- for the sake of clarity it is desirable to forgo the overall
- aspect ratio in order to obtain a minimal pixel level distortion.
- There is no easy way to determine what is best, it is an
- individual thing.
-
- Pixel level distortion is caused by the inability to evenly
- divide the screen pixels into the same number or multiple of
- pixels on the printer. The usual end result is that occasionally
- there will be additional pixels added in the picture causing a
- slight pixel level distortion to maintain the overall picture
- aspect ratio. By slightly changing the aspect ratio of the
- printout you can sometimes eliminate the distortion, or at least
- cause the distortion to occur in a pattern which is more
- acceptable.
-
- When scaling up (expanding) a screen picture the distortion
- can be noticeable, but no data is lost, it is just slightly
- distorted due to the added pixels. When scaling down decisions
- must be made by the program on what data to retain and what to
- discard. This is usually handled on a priority basis. The colors
- are each assigned a priority. When two or more screen pixels must
- be placed in the position of one printer pixel then the screen
- pixel with the highest priority color will take precedence, and
- the rest will be discarded.
-