public synchronized void setAnimated(boolean animated) {
        if(this.animated == animated) {
            return;
        }
        Object consAr[] = consumers.toArray();
        for (Object element : consAr) {
            ImageConsumer con = (ImageConsumer)element;
            try{
                con.imageComplete(ImageConsumer.STATICIMAGEDONE);
            }catch(Exception e){
                if(isConsumer(con)) {
                    con.imageComplete(ImageConsumer.IMAGEERROR);
                }
            }
            if(isConsumer(con)){
                removeConsumer(con);
            }
        }
        this.animated = animated;
    }