public void addObserver(ImageObserver observer) {
        if (observer == null) {
            return;
        }

        // update the new observer to the current state
        Image i = (Image) imageRef.get();
        if (rendererFinished()) {
            // if we're finished, just send a finished notification, don't
            // add to the list of observers
            // System.out.println("Late notify");
            observer.imageUpdate(i, ImageObserver.ALLBITS, 0, 0,
                    imageinfo.width, imageinfo.height);
            return;
        } else {
            // if we're not yet finished, add to the list of observers and
            // notify of the current dirty region
            synchronized (observers) {
                observers.add(observer);
            }

            if (globalDirtyRegion != null) {
                observer.imageUpdate(i, ImageObserver.SOMEBITS,
                        (int) globalDirtyRegion.getMinX(),
                        (int) globalDirtyRegion.getMinY(),
                        (int) globalDirtyRegion.getWidth(),
                        (int) globalDirtyRegion.getHeight());
            }
        }
    }