|
-
Sep 3rd, 2002, 05:33 AM
#1
Thread Starter
New Member
Changing individual colours on a palette
Hi
Can someone explain this whole confusing subject.
What I'm TRYING to do (and I thought it was going to be simple!)
is this:
I have a bitmap. On this picture (amongst other things) is a box filled with 3 colours.
I want to specifiy these three colours by their PALETTE INDEX (is there such a thing) and then change those 3 colours at runtime.
I want all the system colours and all the other colours to remain the same. Which is why I figured I had to use a 256 colour bitmap and leave the first 20 as is, and colour my 'box' with 3 colours from the palette after 20.
How do I know what the index is of the palette and make sure I color the bitmap in with the correct palette index? I'm using Photoshop 6 or Windows Paint.
I'm using VB 6 SP5 and it's now 1130am, I've been at this since 0740 and I STILL can't find anything that would help unless I knew how to program C++!!! Grrrrrr
Thanks
X
-
Sep 3rd, 2002, 06:35 AM
#2
Good Ol' Platypus
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Sep 3rd, 2002, 08:27 AM
#3
Thread Starter
New Member
THanks
Couldn't find a thing about it there...
BUT
I don't want to do this in DX
I want to do it on a bmp on a form in a VB app.
In almost every other language I've played with it was a given that you specify individual palette colours.
Even on C64's or Vic20's you could 'POKE' the values in...
You mean that this can't be done in pure VB??
Arrgghh!
Not even in VB.Net?
X
-
Sep 3rd, 2002, 08:49 AM
#4
Good Ol' Platypus
VB was originally intended for high-level database programming, not graphics That's why we don't have direct access to bitmaps or anything really for that matter. Look into 256 colour DIB sections, then. You'll be able to get some speed on that...
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Sep 4th, 2002, 09:23 AM
#5
The .NET framework allows for it with the Image class (which stores data as a DIB section btw).
System.Drawing.Image
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|