Mail Archives: djgpp/1998/11/11/11:00:24
Message-Id: | <199811111558.PAA10317@remus.clara.net>
|
From: | "Arthur" <arfa AT clara DOT net>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | RE: Allegro and true colours
|
Date: | Wed, 11 Nov 1998 15:57:57 -0000
|
X-Priority: | 3 (Normal)
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook 8.5, Build 4.71.2173.0
|
Importance: | Normal
|
In-Reply-To: | <p8422.152$Zw.809213@news21.bellglobal.com>
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
Reply-To: | djgpp AT delorie DOT com
|
> If I use load_bmp(filename, rgb) to load a 16 or 24 bit colour
> bitmap, do I
> need to set any palettes to use these colours? Currently, when I load the
> bitmap and blit it to the screen all the colours are wrong.
If you are in truecolour mode, all you need to do is
bitmap = load_bmp(filename, NULL);
If you are in 256-colour mode, you can reduce it to a palettised picture:
get_gfx_mode(...);
set_color_conversion(REDUCE_TO_256);
bitmap = load_bmp(filename, pal);
and then the PALETTE pal contains the modified palette. I think the latest
Allegro WIP also dithers the BITMAP so it looks ok when the colours are
reduced.
James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819
- Raw text -