Here you can find the source of offset(final BufferedImage image, final float[] scales, final float[] offsets)
Parameter | Description |
---|---|
image | The image to be adjusted. |
scales | An array of scale operations to be performed on the image's color components. |
offsets | An array of offset operations to be performed on the image's color components. |
private static BufferedImage offset(final BufferedImage image, final float[] scales, final float[] offsets)
//package com.java2s; import java.awt.image.BufferedImage; import java.awt.image.RescaleOp; public class Main { /**/*from w w w . ja va 2 s .c o m*/ * Performs a rescale operation on the image's color components. * * @param image The image to be adjusted. * @param scales An array of scale operations to be performed on the image's color components. * @param offsets An array of offset operations to be performed on the image's color components. * @return The modified image after applying the given adjustments. */ private static BufferedImage offset(final BufferedImage image, final float[] scales, final float[] offsets) { return new RescaleOp(scales, offsets, null).filter(image, null); } }