Package org.libjpegturbo.turbojpeg
Interface TJCustomFilter
-
public interface TJCustomFilterCustom filter callback interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcustomFilter(java.nio.ShortBuffer coeffBuffer, java.awt.Rectangle bufferRegion, java.awt.Rectangle planeRegion, int componentID, int transformID, TJTransform transform)A callback method that can be used to modify the DCT coefficients after they are losslessly transformed but before they are transcoded to a new JPEG image.
-
-
-
Method Detail
-
customFilter
void customFilter(java.nio.ShortBuffer coeffBuffer, java.awt.Rectangle bufferRegion, java.awt.Rectangle planeRegion, int componentID, int transformID, TJTransform transform) throws TJExceptionA callback method that can be used to modify the DCT coefficients after they are losslessly transformed but before they are transcoded to a new JPEG image. This allows for custom filters or other transformations to be applied in the frequency domain.- Parameters:
coeffBuffer- a buffer containing transformed DCT coefficients. (NOTE: this buffer is not guaranteed to be valid once the callback returns, so applications wishing to hand off the DCT coefficients to another method should make a copy of them within the body of the callback.)bufferRegion- rectangle containing the width and height ofcoeffBufferas well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient buffers and call the callback method once for each buffer.planeRegion- rectangle containing the width and height of the component plane to whichcoeffBufferbelongscomponentID- ID number of the component plane to whichcoeffBufferbelongs. (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)transformID- ID number of the transformed image to whichcoeffBufferbelongs. This is the same as the index of the transform in thetransformsarray that was passed toTJTransformer.transform().transform- aTJTransforminstance that specifies the parameters and/or cropping region for this transform- Throws:
TJException
-
-