Jump to content
Xtreme .Net Talk

Palettes and loading from .gifs (2 easy questions)


Recommended Posts

Posted

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

  • 2 weeks later...
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...