![]() |
|
#1
|
|||
|
|||
How to create a "default" 256 color palette?Hello, there
I'm trying to make a program in wich I'll need to deal with bitmap files. I'm already familiarized with the bitmap format and I've already planned almost everything. I've encountered just one problem until now: how to generate a default color palette? I mean, the MS Paint does it for you when you create a new image, leaves it blank and saves it in the 256 color bitmap format; it automatically generates a "default" palette and save it in the file. All I need to do is it. I have a "palette_entry" structure: CPP / C++ / C Code:
I want a code that creates a default palette, with default colors. Something like: CPP / C++ / C Code:
I've searched over the web about this 256 color palettes and I've found http://upload.wikimedia.org/wikipedia/commons/9/93/256colour.png that seems pretty beautiful and useful for me, but I don't mind how to generate it. I'll be thank if someone give me a hint, a reference, an article link or something like that. Well, I apologize for my bad english and, consequently, my bad explanation. Thank you all, dirleyrls |
|||
|
#2
|
|||
|
|||
Re: How to create a "default" 256 color palette?Quote:
I would probably start at the explanation on msdn: The Safety Palette It shows not only "how" but "why" it is recommended to do things a certain way. Then, for purposes of demonstration, I might do something like the following: CPP / C++ / C Code:
Output Code:
Regards, Dave |
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FLTK && fluid In Motion | cable_guy_67 | FLTK Forum | 4 | 20-Mar-2008 04:52 |
| How do I Create a LookUp Table? | toad78 | MySQL / PHP Forum | 0 | 21-Aug-2007 23:05 |
| How create another window for MFC? | Flavs83 | MS Visual C++ / MFC Forum | 1 | 05-Apr-2007 16:04 |
| create array of my class | amad1337 | Java Forum | 4 | 11-Nov-2006 09:26 |
| Simple FLTK dialog box sample | cable_guy_67 | FLTK Forum | 4 | 02-Nov-2004 09:46 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The