Package 

Class Scale


  • 
    public class Scale
    
                        

    Image scaling methods.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum Scale.ScaleType
    • Method Summary

      Modifier and Type Method Description
      static Pix scaleToSize(Pix pixs, int width, int height, Scale.ScaleType type) Scales the Pix to a specified width and height using a specified scalingtype (fill, stretch, etc.).
      static Pix scale(Pix pixs, float scale) Scales the Pix to specified scale.
      static Pix scaleWithoutSharpening(Pix pixs, float scale) Scales the Pix to the specified scale without sharpening.
      static Pix scale(Pix pixs, float scaleX, float scaleY) Scales the Pix to specified x and y scale.
      • Methods inherited from class java.lang.Object

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

      • scaleToSize

         static Pix scaleToSize(Pix pixs, int width, int height, Scale.ScaleType type)

        Scales the Pix to a specified width and height using a specified scalingtype (fill, stretch, etc.). Returns a scaled image or a clone of the Pixif no scaling is required.

        Parameters:
        pixs - Source pix image
        width - The desired width to scale to
        height - The desired height to scale to
        type - The desired scaling type
      • scale

         static Pix scale(Pix pixs, float scale)

        Scales the Pix to specified scale. If no scaling is required, returns aclone of the source Pix.

        Parameters:
        pixs - the source Pix
        scale - dimension scaling factor
      • scaleWithoutSharpening

         static Pix scaleWithoutSharpening(Pix pixs, float scale)

        Scales the Pix to the specified scale without sharpening.

        Parameters:
        pixs - the source Pix (1, 2, 4, 8, 16 and 32 bpp)
        scale - scaling factor for both X and Y
      • scale

         static Pix scale(Pix pixs, float scaleX, float scaleY)

        Scales the Pix to specified x and y scale. If no scaling is required,returns a clone of the source Pix.

        Parameters:
        pixs - the source Pix
        scaleX - x-dimension (width) scaling factor
        scaleY - y-dimension (height) scaling factor