🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

PNG and pack files

Started by
2 comments, last by Modian 24 years, 9 months ago
Read http://www.cdrom.com/pub/png/libpng.html

Go to 'V. MODIFYING/CUSTOMIZING LIBPNG'

Basically, you write your own read functions for the packfile and give them to libpng. Then it will use them to read the file.

Advertisement
Yeah, I noticed that, but I wanted to see if anyone knew of another way before I rewrote my PNG reading routine.

Thanks

I use PNG files in my game. Right now, they're all grouped in seperate directories as regular files. What I want to do is pack them all together into one file. Writing the packed file is not an issue, the problem is figuring out how toread the PNG files from it. libpng expects a file pointer for its reads, which isn't very viable with them packed together. So does anyone know how I could read a PNG file from a packed file? Or should I go with a different graphic format?
----------------------
Modian
Take a look at the Code on the Cob series of articles written by Chris Hargrove of 3DRealms. They're on www.loonygames.com, and in the issue that he delves into file i/o, he explains how to make a .pak'd file.

I'm glad you wrote this in the board, because it's reminded me to find out if I could get a local copy of these for GDNet. :-)

Kevin

Admin for GameDev.net.

This topic is closed to new replies.

Advertisement