public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) {
        if((flags & HEIGHT)!=0) {
            this.imgHeight=height;
        }
        if((flags & WIDTH)!=0) {
            this.imgWidth=width;
        }
        return(this.imgHeight<0 || this.imgWidth<0 /*|| this.imgBitsPerPixel <0
                || this.imgIndexedColors <0*/);
    }