Package games.stendhal.tools.charas
Class RawScale2x
java.lang.Object
games.stendhal.tools.charas.RawScale2x
A simple implementation of the Scale2x algorithm for scaling raw image data.
- Author:
- Kevin Glass
-
Constructor Summary
ConstructorDescriptionRawScale2x(int[] imageData, int dataWidth, int dataHeight)
Create a new scaler based on some raw data. -
Method Summary
-
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 datadataWidth
- The width of the source imagedataHeight
- 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
-