473,503 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Loadimage and DIB palette

Hi,

Currently, I use a cDIB class to manage all color depth DIBs. But now I
would like to avoid selecting my hDIB into a DC, and process all through
manipulating data directly from/through lpBits (color data pointer). The
problem comes at time to load palette based bitmaps through LoadImage API.
Now, once I have hDIB, I select into a DC and extract palette using
GetDIBColorTable. My question is if it's possible to extract palette without
making use of a DC (is palette located inmediately before of global memory
DIB image data?). In case not possible, I guess I should create a temporary
DC, or, code my own LoadDIB function...

The main aim is avoid extra GDI objects. My application (game) loads
about 100 8-bpp DIBs, and I would like to work only with byte-arrays
(StrecthDIBits...).

Carles.
Nov 21 '05 #1
0 1143

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1282
by: jean marc | last post by:
Hello I am trying to reduce a truecolor image to a palette one. imagetruecolortopalette() works just fine, except, that I would like to keep a few color unchanged. like a (255,0,0) red, a...
4
4083
by: Just Me | last post by:
I asked this in the VB NG and didn't get a response. I think this NG is no apt to know this kind of thing so I'm trying here. Trying to display the palette that is on the clipboard. I get a...
0
1052
by: Micus | last post by:
Hi all, Does anyone have experience with using a palette with a progress control? Everything works fine with a scrollbar control, but I think there are issues with the progress control because it's...
1
5800
by: Stuart | last post by:
I am using the Python Imaging Library (PIL) to process GIF images. I need to be able to retrieve the RGB values for each color palette entry. I see that the 'Image' class has a 'palette'...
6
1287
by: active | last post by:
I asked this in VB without results. I'm not surprised that no one there knows anything about because it's kind of an uncommon subject. Maybe some one here knows. Dim DataO As DataObject =...
15
2023
by: active | last post by:
Below is a small but complete program that appears to show you can't retrive a Palette from the clipboard. This is true whether the palette is placed on the clipboard by Photoshop or Photoshop...
8
2455
by: active | last post by:
Guess I'm looking for someone who likes to work difficult puzzles. I can't seem to ever retrieve a palette handle from the clipboard. Below is a simple test program that demonstrates the...
3
2371
by: krishnasamy | last post by:
Hi, I have writing the code for change the Palette color of the Bitmap. But I didn't get any different between given image and result image. Here I given my code, Bitmap *bmp=new...
1
1473
by: jj | last post by:
The following creates a copy of an image. It worked fine in Visual Studio 2005, but after installing Visual Studio 2008 then opening the solution as a ..net 2.0 project, I get an error on the...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.