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