Skip to main content
gamedev.net
🔒 Locked

Damn Java :@

Started by mln_samah Jun 17, 2002 at 10:39 AM 2 replies 400+ views
Original Post
mln_samah
mln_samah
Does anyone know a way to serialize an image?? I''ve been trying for about 6 hours now to create classes extending/implementing various things to see if I can somehow typecast it Java is hella slow at loading images, so I''m trying to load the image in, and after running Toolkit.getDefaultToolkit().prepareImage, I want to serialize the damn thing and store it to disk so I can load it in quicker (will be extremely useful since I have a potential 30mb of images to load in over 1500 files). --Samah
felonius
felonius
I don''t know how to serialize an image, but I do know that serialization in Java is *very slow* so you will probably get slower loading times if you get it to work.

BTW, you might want to ask this question at the forums at www.javagaming.org. They are much better at this.
Jacob Marner, M.Sc.Console Programmer, Deadline Games
Arild Fines
Arild Fines
I''m not really getting this. You say Java image loading is slow, so you want to serialize it to disk instead? What do you think the deserializer does? Conjures up images from the air around your CPU fan?

--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
mln_samah
mln_samah
No worries - after a bit of RTFM I worked out I can use ImageIcon to load images instead - loads my test image in 0.3 seconds instead of 11

And although I no longer need to do serialization, ironically ImageIcon is serializable

--Samah

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.