1. Something funny with graphics...

I tried running one of my graphics-library demos in what I call mode 2,
640x480x65k.  Problem...the 'bytes_per_line' variable reads 1280, which
is 2*640.  That's bad...it makes the stuff smushed on the x-axis.  Is
there any way to avoid that?  Also, how do you set 2^16 or 2^24 or 2^32
number of colors (like some form of all_palette() ), I'm assuming since
NEIL.E only does that for 256 colors, it can't be done easily.  I'm
wondering if Greg's palette.e (which are on the Eu Archive) routines
would work, oh, Greg, by the way, thanks for those routines, you saved
me a lot of re-working on the library.  Also, when I put the colors in,
and it works fine in 256-color modes, it looks **bad**, I mean **bad**
in 16-bit mode.  Interesting...must be a different way of setting
colors.  Ideas anybody?

Thanks all, again, again, and again,
Mike Hurley

PS. Thanks all who read all my messages, I know I'm probably sounding
repetative with these questions.

PS2. I'm planning on releasing VGCL.E library (Virtual Graphics
Coordinating Library) sometime next week, if I don't have too much
homework! :)
===
::dozes off::
zzzzzzzzputerzzzzzzs kxhaaaaaaaaahshoooooooooooo comzzzzzp
_________________________________________________________
Do You Yahoo!?
 Free instant messaging and more at http://messenger.yahoo.com

new topic     » topic index » view message » categorize

2. Re: Something funny with graphics...

On Mon, 10 May 1999 18:54:49 -0700, Mike Hurley <mikehurley2 at YAHOO.COM>
wrote:

>I tried running one of my graphics-library demos in what I call mode 2,
>640x480x65k.  Problem...the 'bytes_per_line' variable reads 1280, which
>is 2*640.  That's bad...it makes the stuff smushed on the x-axis.  Is
>there any way to avoid that?

Since you're using a 65K mode, it probably uses 2 bytes per pixel,
that's why your bytes_per_line is double what you expected it to be.

-Mark.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Something funny with graphics...

Hi Mike,

-----Original Message-----
Subject: Something funny with graphics...


>I tried running one of my graphics-library demos in what I call mode 2,
>640x480x65k.  Problem...the 'bytes_per_line' variable reads 1280, which
>is 2*640.  That's bad...it makes the stuff smushed on the x-axis.  Is
>there any way to avoid that?  Also, how do you set 2^16 or 2^24 or 2^32


That would make sense. How are you calculating you x axis? I would assume
you would need something
like:

offset = (y * bytes_per_line) + (x*2)  (for 65K modes)

You probably would want to use a look up table or something to pre-calc most
of it if possible..

>number of colors (like some form of all_palette() ), I'm assuming since
>NEIL.E only does that for 256 colors, it can't be done easily.  I'm
>wondering if Greg's palette.e (which are on the Eu Archive) routines
>would work, oh, Greg, by the way, thanks for those routines, you saved
>me a lot of re-working on the library.  Also, when I put the colors in,
>and it works fine in 256-color modes, it looks **bad**, I mean **bad**
>in 16-bit mode.  Interesting...must be a different way of setting
>colors.  Ideas anybody?


I think palette.e will only work in 256 color modes.. that uses palette
indexing.. I don't think that it will work in the
other modes. Pete could probably tell you better on this one. If not.. I
have to go to the basement and drag out
my old DOS book.

Thanks for the compliment on the palette routines.

Greg Harris
HHS

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu