- /** Processes an image from InputStream is; returns null if there is an error
- @param name A string describing the image; used for error reporting.
- */
- public static GIF decode(InputStream is, String name) {
+ private static Queue instances = new Queue(10);
+
+ public static void load(InputStream is, Picture p) {
+ GIF g = (GIF)instances.remove(false);
+ if (g == null) g = new GIF();