Re: Pallete shifting, gif

 BBS: Inland Empire Archive
Date: 03-25-93 (11:39)             Number: 357
From: RICH GELDREICH               Refer#: NONE
  To: CALVIN FRENCH                 Recvd: NO  
Subj: Re: Pallete shifting, gif      Conf: (2) Quik_Bas
> Hi everybody! TD2.0 is just about done with the exception of
> palette support and GIF cropping. Sooo... i need to know if
> anyone out there knows just how to read the palette values (red,
> green, blue) from memory (o yeah, I'm using screen 13).

    To read the palette values, you can either call BIOS or do some
IN's. BIOS is easy, but I don't like it. The following code will read
the RGB values for palettes 16-256:

    DIM R(255),G(255),B(255)

    OUT &H3C7,16 ' Tell VGA we want to start reading from col. 16
    FOR A=16 TO 256

    That's off the top of my head, but it should work. Just OUT the
first index to &H3C7, and read the RGB values from &H3C9. You don't have
to constantly OUT to &H3C7 because the VGA can pass them to you in

> Secondly, if anyone out there has some good code for reading
> GIFs, could you give it to me?? (smile) I had a look at Rich's
> (hail Rich, master Guru of Graphics (3d esp), hail Rich! Long
> live king Richard! (that is, Geldrich). Long live the master of
> QB!) code but, unfortunatly, I have been unable to convert it
> into a SUB, which is basically what I need. So, Rich, in regards

    If you give me a call I'm sure I could fix you up with something
that you would find most useful...

    I've written some GIF subs in the past, but I've sinced looked at
the GIF89a spec and noticed that my subs didn't follow the standard as
closely as they should. I'll fix that up sooner or later. I *do* have a
GIF89a GIF decoder in QB, which is pretty fast, but it's not in a
callable sub.


--- MsgToss 2.0b
 * Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET