www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/21/16:30:18

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 3 Newbie questions about graphics
Date: Mon, 22 May 2000 00:21:03 +0400
Organization: MTU-Intel ISP
Lines: 32
Message-ID: <3928452F.F08F3E1F@mtu-net.ru>
References: <nKVV4.5169$wYl DOT 218653696 AT newsb DOT telia DOT net>
NNTP-Posting-Host: ppp108-234.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 958940945 71823 212.188.108.234 (21 May 2000 20:29:05 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 21 May 2000 20:29:05 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: ru,en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Christian wrote:
> 
> Hi, i have 3 questions
> 
> 1.  If i want to show a image on the screen, do i have to set a pallete for
> it?
> if so
> 2.  How do i create that pallete?  I haven't been able to find anything
> about it in allegro.txt.

Where is the 3rd one? :)

1. You need to setup palette, if your gfx mode is palettized (256 colors).
Hi/true-color gfx modes don't need palette. They work with RGB.

2. A. If your picture file holds a hi/true-color picture, you must make up a
palette from it for 256-colored gfx mode and convert the RGB image data to
8-bit indexes. You don't have to do that, if your gfx mode is the same
hi/true-color. 

2. B. If your picture file is 256-colored you get palette from the file.
Then you either setup that palette for 256-colored gfx mode or convert image
data to RGB for hi/true-color gfx mode depending on the palette stored in
the picture file.

Good Luck
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror:   http://members.xoom.com/alexfru


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019