Class ImageUtils

java.lang.Object
de.pianoman911.mapengine.api.util.ImageUtils

public final class ImageUtils extends Object
Utilities for working with BufferedImage's.
  • Method Details

    • resize

      public static BufferedImage resize(BufferedImage image, int width, int height)
      Creates a new image with the given width and height using the content of the given image.
      Parameters:
      image - the image to resize
      width - the new width
      height - the new height
      Returns:
      the resized image
    • rgb

      public static int[] rgb(BufferedImage image)
      A helper method to get the rgb array from a buffered image.
      Parameters:
      image - the image to get the rgb array from
      Returns:
      the rgb array of the image
    • cutImage

      public static BufferedImage cutImage(BufferedImage image)