I thought you were complaining about the memory usage of #get_image_data().

First, I am going to say that you are going to have to hit the disk/slow
memory anyways to load the image and that this very well might fall under
pre-optimization.

As for the actual image, because JPEGs are compressed, I believe you have
to read the whole thing in. If you were using something like a BMP, you
could just index into the image. That being said, you still need to get
that BMP loaded from disk into memory which is going to be orders of
magnitude slower/costly.

That hit to disk is why sprite sheets are often used so that a continuous
block of memory gets retrieved efficiently.

**whiskey warning**


On Tue, Aug 19, 2014 at 6:54 PM, Raymond Liu <[email protected]> wrote:

>
> Swiftcoder you're absolutely right. Somehow in my stupid brain I counted
> 1000 bytes as a megabyte.
>
> Filipe, are you saying that either way I'm going to have the whole bitmap
> in my memory at some point, and there is nothing I can do about it???
>
> --
> You received this message because you are subscribed to the Google Groups
> "pyglet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pyglet-users.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Incoherently,
Ricky Ng

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to