[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Animated sprites




>Does loading an sequence of animation strips from a single file take
>up less memory than loading up each frame from its own file. I know
>they take less time to load from the HDD, but I don't see how they
>could take up less memory...

uhm...
I believe that JPEGs and other image compression algorithms create
"dictionaries"
or "tables"
like a zip file does...

so the bigger a file you're compressing the more likely there will be
redundancies
that can be reduced with a simple reference to its corresponding location in
the table.
if you're not clear on how zip files work,
www.howstuffworks.com has an article on it.

Hope that helps a little.
-Luke