Package org.libjpegturbo.turbojpeg
Interface TJCustomFilter
- 
 public interface TJCustomFilterCustom filter callback interface
- 
- 
Method SummaryAll 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 function 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- 
customFiltervoid customFilter(java.nio.ShortBuffer coeffBuffer, java.awt.Rectangle bufferRegion, java.awt.Rectangle planeRegion, int componentID, int transformID, TJTransform transform) throws TJExceptionA callback function 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 function or library should make a copy of them within the body of the callback.)
- bufferRegion- rectangle containing the width and height of- coeffBufferas 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 function once for each buffer.
- planeRegion- rectangle containing the width and height of the component plane to which- coeffBufferbelongs
- componentID- ID number of the component plane to which- coeffBufferbelongs. (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 which- coeffBufferbelongs. This is the same as the index of the transform in the- transformsarray that was passed to- TJTransformer.transform().
- transform- a- TJTransforminstance that specifies the parameters and/or cropping region for this transform
- Throws:
- TJException
 
 
- 
 
-