Class RawScale2x


  • public class RawScale2x
    extends java.lang.Object
    A simple implementation of the Scale2x algorithm for scaling raw image data.
    • Constructor Summary

      Constructors 
      Constructor Description
      RawScale2x​(int @NotNull [] imageData, int dataWidth, int dataHeight)
      Creates a new scaler based on some raw data.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int @NotNull [] getScaledData()
      Gets the scale image data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RawScale2x

        public RawScale2x​(int @NotNull [] imageData,
                          int dataWidth,
                          int dataHeight)
        Creates 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 @NotNull [] getScaledData()
        Gets 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