code: public ImageHandlerBuilder resizeToHeight(int size) {
           if (image.getHeight() < size) return this;
           BufferedImage resize = Scalr.resize(image, Scalr.Mode.FIT_TO_HEIGHT, Math.min(size, image.getHeight()));
           image.flush();
           image = resize;
           return this;
       }
docs: Resize the image to a given height, maintaining the original proportions of the image
  and setting the width accordingly.
  If the height of the image is smaller than the provided size, then the image is not scaled.
  @param size
  @return