org.lee.mugen.imageIO
Class RawScale2x

java.lang.Object
  extended by org.lee.mugen.imageIO.RawScale2x

public class RawScale2x
extends java.lang.Object

A simple implementation of the Scale2x algorithm for scaling raw image data.

Author:
Kevin Glass

Constructor Summary
RawScale2x(int[] imageData, int dataWidth, int dataHeight)
          Create a new scaler based on some raw data.
 
Method Summary
 int[] getData()
           
 int[] getScaledData()
          Get the scale image data.
 void refresh(int[] srcData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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

getData

public int[] getData()

refresh

public void refresh(int[] srcData)