synchronized void setThumbImage(BufferedImage img,ImageType type){
        MultiSizeImage setter;
        if(type==ImageType.Icon) setter=iconImage;
        else setter=originalImage;
        if((img!=null)) setter.thumbDimensions=new Dimension(img.getWidth(),img.getHeight());
        //if(img==null) {Log.Print(LogType.Error, "Setting icon to null");Thread.dumpStack();return;}
        setter.thumbImage = img;
        if(type.isBad()) thumbType = type;
        else if(type.isFiltered()) {
            filterImage(ImgSize.Thumb);
            thumbType = ImageType.Filtered;
        }
        else thumbType = type;//original and not to be filtered
    }