home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12308 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.3 KB  |  50 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!sasres
  3. From: sasres@ocelot.unx.sas.com (Ron Stogner)
  4. Subject: Re: Wanted : Borlands "getimage" format for graphics
  5. Originator: sasres@ocelot.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <C17zqA.E93@unx.sas.com>
  8. Date: Thu, 21 Jan 1993 20:03:44 GMT
  9. References: <1993Jan18.214618.20557@sbcs.sunysb.edu> <C13wsv.HuL@unx.sas.com> <1jkrh7INNopp@escargot.xx.rmit.OZ.AU>
  10. Nntp-Posting-Host: ocelot.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 36
  13.  
  14.  
  15. In article <1jkrh7INNopp@escargot.xx.rmit.OZ.AU>, rcskb@minyos.xx.rmit.OZ.AU (Kendall Bennett) writes:
  16. |> sasres@ocelot.unx.sas.com (Ron Stogner) writes:
  17. |>
  18. |>
  19. |> >EGA and VGA have four bit planes (i.e. 4 bits per pixel.).  Borland
  20. |> >basically stores scan lines from each bit plane and then repeats this
  21. |> >until all scan lines are done.  They include three extra words (if
  22. |> >you call "imagesize" for a region you will find that the amount of
  23. |> >memory is three words larger than the required memory for the image).
  24. |> >Two of these words are the x and y size (in pixels) of the region.
  25. |> >These are the first two words of the image.  I never could figure out
  26. |> >what the third word was for (but it didn't seem to matter).  My guess
  27. |> >is it is reserved or used for other video cards and didn't matter for
  28. |> >VGA and EGA.  I can't remember if this word was at the end of the image
  29. |> >or after the x,y words.  I think it was at the end.
  30. |>
  31. |> This mystery word is probably a bit mask for the last byte in each line
  32. |> of the image, so that it will be correctly clipped when it is drawn. At
  33. |> least this is what I use it for in my graphics library :-) You only need
  34. |> a single byte for this, but by using a word value, you can ensure that
  35. |> the image data in system memory will be aligned on a word boundary (since
  36. |> malloc always aligns the memory), which under the correct circumstances
  37. |> will make things faster.
  38. |>
  39.  
  40. Kendall:
  41.  
  42. Thanks for the info.  That makes sense.  One thing, however, since the
  43. image can be "clipped" on both ends you probably do need both bytes,
  44. one for the first byte on each line and one for the last.  I'll have
  45. to play with it sometime and see.  If I could only find my old code...
  46.  
  47. Ron Stogner
  48. (sasres@unx.sas.com)
  49.  
  50.