Class FilterOp

java.lang.Object
bdsup2sub.bitmap.FilterOp

class FilterOp extends Object
Subsampling scaling algorithm with various filters.

Based on the ResampleOp class from the Java Image Scaling Library. by Morten Nobel-Joergensen which again is based on "Java Image Util".

  • Field Details

    • srcWidth

      private int srcWidth
    • srcHeight

      private int srcHeight
    • dstWidth

      private final int dstWidth
    • dstHeight

      private final int dstHeight
    • r

      private byte[] r
    • g

      private byte[] g
    • b

      private byte[] b
    • a

      private byte[] a
    • horizontalSubsamplingData

      private FilterOp.SubSamplingData horizontalSubsamplingData
    • verticalSubsamplingData

      private FilterOp.SubSamplingData verticalSubsamplingData
    • filter

      private final com.mortennobel.imagescaling.ResampleFilter filter
  • Constructor Details

    • FilterOp

      public FilterOp(com.mortennobel.imagescaling.ResampleFilter filter, int dstWidth, int dstHeight)
  • Method Details

    • filter

      public int[] filter(Bitmap bitmap, Palette palette)
    • createSubSampling

      private FilterOp.SubSamplingData createSubSampling(int srcSize, int dstSize)
    • filterVertically

      private void filterVertically(int[] src, int[] trg)
      Apply filter to sample vertically from temporary buffer to target buffer
      Parameters:
      src - Integer array holding result from filtering horizontally
      trg - Integer array for target bitmap
    • filterHorizontally

      private void filterHorizontally(byte[] src, int[] trg)
      Apply filter to sample horizontally from src to Work
      Parameters:
      src - Byte array holding source image data
      trg - Integer array to store temporary result from filtering horizontally