public class TJTransformer extends TJDecompressor
handle, jpegBuf, jpegBufSize, jpegColorspace, jpegHeight, jpegSubsamp, jpegWidth, yuvImage| Constructor and Description |
|---|
TJTransformer()
Create a TurboJPEG lossless transformer instance.
|
TJTransformer(byte[] jpegImage)
Create a TurboJPEG lossless transformer instance and associate the JPEG
image stored in
jpegImage with the newly created instance. |
TJTransformer(byte[] jpegImage,
int imageSize)
Create a TurboJPEG lossless transformer instance and associate the JPEG
image of length
imageSize bytes stored in
jpegImage with the newly created instance. |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getTransformedSizes()
Returns an array containing the sizes of the transformed JPEG images
generated by the most recent transform operation.
|
void |
transform(byte[][] dstBufs,
TJTransform[] transforms,
int flags)
Losslessly transform the JPEG image associated with this transformer
instance into one or more JPEG images stored in the given destination
buffers.
|
TJDecompressor[] |
transform(TJTransform[] transforms,
int flags)
Losslessly transform the JPEG image associated with this transformer
instance and return an array of
TJDecompressor instances, each of
which has a transformed JPEG image associated with it. |
close, decompress, decompress, decompress, decompress, decompress, decompress, decompressToYUV, decompressToYUV, decompressToYUV, decompressToYUV, decompressToYUV, finalize, getColorspace, getHeight, getJPEGBuf, getJPEGSize, getScaledHeight, getScaledWidth, getSubsamp, getWidth, setJPEGImage, setSourceImage, setSourceImagepublic TJTransformer()
throws TJException
TJExceptionpublic TJTransformer(byte[] jpegImage)
throws TJException
jpegImage with the newly created instance.jpegImage - JPEG image buffer (size of the JPEG image is assumed to
be the length of the array.) This buffer is not modified.TJExceptionpublic TJTransformer(byte[] jpegImage,
int imageSize)
throws TJException
imageSize bytes stored in
jpegImage with the newly created instance.jpegImage - JPEG image buffer. This buffer is not modified.imageSize - size of the JPEG image (in bytes)TJExceptionpublic void transform(byte[][] dstBufs,
TJTransform[] transforms,
int flags)
throws TJException
dstBufs - an array of image buffers. dstbufs[i] will
receive a JPEG image that has been transformed using the parameters in
transforms[i]. Use TJ.bufSize(int, int, int) to determine the
maximum size for each buffer based on the transformed or cropped width and
height and the level of subsampling used in the source image.transforms - an array of TJTransform instances, each of
which specifies the transform parameters and/or cropping region for the
corresponding transformed output imageflags - the bitwise OR of one or more of
TJ.FLAG_*TJExceptionpublic TJDecompressor[] transform(TJTransform[] transforms, int flags) throws TJException
TJDecompressor instances, each of
which has a transformed JPEG image associated with it.transforms - an array of TJTransform instances, each of
which specifies the transform parameters and/or cropping region for the
corresponding transformed output imageflags - the bitwise OR of one or more of
TJ.FLAG_*TJDecompressor instances, each of
which has a transformed JPEG image associated with it.TJExceptionpublic int[] getTransformedSizes()