consumer.setDimensions(width, height);
srcWidth = width; srcHeight = height;   if (destWidth < 0 && destHeight < 0) { destWidth = width; destHeight = height; } else if (destWidth < 0) { destWidth = (int) (width * ((double) destHeight / srcHeight)); } else if (destHeight < 0) { destHeight = (int) (height * ((double) destWidth / srcWidth)); }  consumer.setDimensions(destWidth, destHeight);
    public void setDimensions(int width, int height)    {	consumer.setDimensions(width, height);    }