docs: public void resize(int w, int h) {
  
          // using the new approach of Java 2D API
          BufferedImage buf = new BufferedImage(w, h, image.getType());
          Graphics2D g2d = (Graphics2D) buf.getGraphics();
          g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
          g2d.drawImage(image, 0, 0, w, h, null);
          g2d.dispose();
          image = buf;
          width = w;
          height = h;
          updateColorArray();
      }