Palettes and loading from .gifs (2 easy questions)

slantz

Freshman
Joined
Dec 12, 2003
Messages
37
Hey all. 2 seperate but related issues:

1) Is there an easy way to load a .gif onto a surface? (I have no trouble loading from a .gif embedded resource, but when loading from a file it chokes. The DD documentation seems to indicate it only natively can handle .bmp's...)

2) I want to populate the .Palette property of a surface with the palette that was defined in the image file (.bmp or .gif -- either one.) Anyone aware of an easy way to populate SurfaceInstance.Palette with the appropriate palette?
(I want to load the palette for a surface so I can change a few designated colors/palette_entries in the image before blitting it to the main surface.)


Any help would be greatly apprecaited

-Hiro_Antagonist
 
SUPPORTED FORMATS

DirectX does not support gif files, it supports ...

PNG
BMP
DDS
DIG
PPM
TGA

so I would use PNG instead forexample. What your trying to do is done using textures, there is a working example in the DirectX Sample Browser that gets installed with the SDK
 
Back
Top