Package bdsup2sub.bitmap
Class FilterOp
java.lang.Object
bdsup2sub.bitmap.FilterOp
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".
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private byte[]private final intprivate final intprivate final com.mortennobel.imagescaling.ResampleFilterprivate byte[]private FilterOp.SubSamplingDataprivate byte[]private intprivate intprivate FilterOp.SubSamplingData -
Constructor Summary
ConstructorsConstructorDescriptionFilterOp(com.mortennobel.imagescaling.ResampleFilter filter, int dstWidth, int dstHeight) -
Method Summary
Modifier and TypeMethodDescriptionprivate FilterOp.SubSamplingDatacreateSubSampling(int srcSize, int dstSize) int[]private voidfilterHorizontally(byte[] src, int[] trg) Apply filter to sample horizontally from src to Workprivate voidfilterVertically(int[] src, int[] trg) Apply filter to sample vertically from temporary buffer to target buffer
-
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
-
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
-
createSubSampling
-
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 horizontallytrg- 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 datatrg- Integer array to store temporary result from filtering horizontally
-