[SDL] showing bitmaps

Ken Rogoway Ken at HomebrewSoftware.com
Thu Apr 3 07:49:20 PDT 2008


If I understand you correctly you want multiple bmps on the screen at the
same time and your screen resolution is 8bpp?  If that is the case you will
need to pre-process your bmp files so they all have a common palette.

Ken Rogoway
Homebrew Software
http://www.homebrewsoftware.com/
 

-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org] On
Behalf Of hinko.kocevar at cetrtapot.si
Sent: Thursday, April 03, 2008 6:49 AM
To: sdl at lists.libsdl.org
Subject: [SDL] showing bitmaps

Hello,

I have a question for all you graphics programmers out there:

Situation:
Linux OS with framebuffer device - 320x240 8bpp. Console application (no SDL
yet:() tries to draw two bitmap images pixel by pixel to the framebuffer.
The final result is that colors on first image are corrupt, when I write the
colors from second image to the framebuffer palette.

Procedure:
read bmp1
set color palette from bmp1
draw bmp1
read bmp2
set color palette from bmp2
draw bmp2

How can one display several 8 bpp BMP images on screen so that they all
retain its correct colors?


Thank you,
Hinko

--
CETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar at cetrtapot.si
Http: www.cetrtapot.si

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.5/1356 - Release Date: 4/2/2008
4:14 PM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.5/1356 - Release Date: 4/2/2008
4:14 PM
 



More information about the SDL mailing list