Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


PNG and pack files


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Modian   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 September 1999 - 10:39 AM

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?

Sponsor:

#2 Jeff K   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 September 1999 - 05:07 AM

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.


#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 16 September 1999 - 08:48 AM

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

Thanks


#4 Khawk   Senior Staff   -  Reputation: 1362

Like
Likes
Like

Posted 16 September 1999 - 10:39 AM

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS