Class RawScale2x

java.lang.Object
games.stendhal.tools.charas.RawScale2x

public class RawScale2x extends Object
A simple implementation of the Scale2x algorithm for scaling raw image data.
Author:
Kevin Glass
  • Constructor Details

    • RawScale2x

      public RawScale2x(int[] imageData, int dataWidth, int dataHeight)
      Create a new scaler based on some raw data. Right now it doesn't matter what order the channels in, just that its an int per pixel
      Parameters:
      imageData - The source image data
      dataWidth - The width of the source image
      dataHeight - The height of the source image
  • Method Details

    • getScaledData

      public int[] getScaledData()
      Get the scale image data. Note this is the method that does the work so it might take some time to process.
      Returns:
      An array of pixels 4 times the size of the input array containing the smoothly scaled image