public void startProduction(ImageConsumer ic) {
        if(!isConsumer(ic) && ic != null) {
            consumers.addElement(ic);
        }
        try{
            setHeader(ic);
            setPixels(ic, 0, 0, width, height);
            if(animated){
                ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
            }else{
                ic.imageComplete(ImageConsumer.STATICIMAGEDONE);
                if(isConsumer(ic)) {
                    removeConsumer(ic);
                }
            }
        }catch(Exception e){
            if(isConsumer(ic)) {
                ic.imageComplete(ImageConsumer.IMAGEERROR);
            }
            if(isConsumer(ic)) {
                removeConsumer(ic);
            }
        }
    }