Solved

Setting 0-255 RGB Intensity in a 256 Color Palette

Posted on 1997-06-21
2
587 Views
Last Modified: 2012-08-14
Hello,
I am an amateur C/C++ programmer currently programming for Dos in MSVC 1.52 without MFC support.
I would like to know of a way to remap a 256-color screen palette, so that each color is composed of a RGB triplet.
However, the way that I found to do this only allows to set a 0-63 value for each RGB component.
What procedure do I need to use in order to be able to set each RGB component in a range of 0-255?

Thanks in advance to anyone who helps me out,
Sincerely,
EnigMasterMind.
0
Comment
Question by:enigmastermind
2 Comments
 
LVL 4

Accepted Solution

by:
AVaulin earned 50 total points
ID: 1164013
You must change current palette. The easiest way to do this is using some libraries which allows to do this. For example PCX Toolkit by Genus Microprograming Co. Also this toolkit allow to do many useful things for graphics in DOS.
Try and good luck.
0
 
LVL 1

Expert Comment

by:mosfet
ID: 1164014
The reason you can't find a way to have an RGB value of 0-255 in 256 color mode is because there isn't one. RGB values of 0-63 define 256 colors. RGB values of 0-255 define Truecolor 16.7 million colors. Of course this is going to be SVGA.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now