Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2D Graphics (PNG?) Load/Use help needed

3 views
Skip to first unread message

CDW8490104

unread,
Sep 23, 2001, 4:58:40 PM9/23/01
to
Hi,

I'm using C++ and DirectX (using the 6.1 SDK - I know, I'll upgrade soon) and
I'd like to include 2D graphics in my program. I'd like to use something of
higher color depth than 8-bit palletized BMPs, but find the 24-bit BMPs to have
file sizes that are way too large. Unable to create a 16-bit BMP in Adobe, I've
started looking for alternative graphics formats. I've found one called PNG
(Portable Network Graphics) which seems great, high color depth, and low file
size (compared to BMP). However, I just have no clue how to load and draw these
things to my surfaces. I've tried looking online for help, but can't seem to
find anything that works. So if anyone out there knows where I can find help or
could post the code I'd need to load and display PNG files (at 16 or 32 bpp)
with DirectX it would be greatly appreciated. Also, if anyone has suggestions,
such as for a better file format to use (and has the code I'd need to use that
format) then please reply as well. I'm sure this is a real simple problem to
most of you, but I've been getting headaches for the last two days trying to
figure all this out. Thanks for your time.

Brad

Tony Cox [MS]

unread,
Sep 24, 2001, 2:10:06 PM9/24/01
to
> I'm using C++ and DirectX (using the 6.1 SDK - I know, I'll upgrade soon)
and
> I'd like to include 2D graphics in my program. I'd like to use something
of
> higher color depth than 8-bit palletized BMPs, but find the 24-bit BMPs to
have
> file sizes that are way too large. Unable to create a 16-bit BMP in Adobe,
I've
> started looking for alternative graphics formats. I've found one called
PNG
> (Portable Network Graphics) which seems great, high color depth, and low
file
> size (compared to BMP). However, I just have no clue how to load and draw
these
> things to my surfaces.
[snip]

Upgrading would help a lot. The D3DX utility library in DX 8.0 has a
comprehensive bitmap file loader that understands lots of file formats,
including PNG.

Tony Cox - Lead Software Engineer
Windows Gaming Developer Relations Group


0 new messages