Advertisement

[java] Multiple requests for same image

Started by May 02, 2001 08:45 AM
13 comments, last by dr-m 23 years, 9 months ago
Load the original
create an Image buffer the same size
use drawImage() to fill it
then get rid of the original

No pixel grabbing at all
Dave
I''m doing it the ugly way now, that is grabbing the whole image first, then cutting out regions from the int[]. That works, but it ain''t pretty.. (and it''s causing two requests for the same image, but thats still better than 30).

Dave: I''m doing that when i don''t care about transperacy. But when grabbing my sprites (using the last piece of code I posted), I can''t use drawImage() to transfer them, or I lose the transperacy information.

/ dr-m
Advertisement
Oops, forgot about that
I''m just recently getting comfortable with MemoryImageSource etc.. and fiddling with alpha channels.

Dave
Oops, forgot about that
I''m just recently getting comfortable with MemoryImageSource etc.. and fiddling with alpha channels.

Dave
I got a server timed out message while sending the first one. I assumed it wasn''t posted. I guess I should register so I can delete these little problems.

Dave

This topic is closed to new replies.

Advertisement