-
public interface ImageTranscoderThe abstraction for an image transcoder
-
-
Method Summary
Modifier and Type Method Description abstract ImageTranscodeResulttranscode(EncodedImage encodedImage, OutputStream outputStream, RotationOptions rotationOptions, ResizeOptions resizeOptions, ImageFormat outputFormat, Integer quality, ColorSpace colorSpace)Transcodes an image to match the specified rotation and resize options. abstract BooleancanResize(EncodedImage encodedImage, RotationOptions rotationOptions, ResizeOptions resizeOptions)Whether the input image is resized to make subsequent decodings faster. abstract BooleancanTranscode(ImageFormat imageFormat)Whether the input ImageFormat can be transcoded by the image transcoder. abstract StringgetIdentifier()Gets the identifier of the image transcoder. -
-
Method Detail
-
transcode
abstract ImageTranscodeResult transcode(EncodedImage encodedImage, OutputStream outputStream, RotationOptions rotationOptions, ResizeOptions resizeOptions, ImageFormat outputFormat, Integer quality, ColorSpace colorSpace)
Transcodes an image to match the specified rotation and resize options. The most common-use case is to create a resized version of an input image to make subsequent decodings faster.
- Parameters:
encodedImage- The EncodedImage that will be transcoded.outputStream- The OutputStream where the newly created image is written to.rotationOptions- The RotationOptions used when transcoding the image.resizeOptions- The ResizeOptions used when transcoding the image.outputFormat- The desired ImageFormat of the newly created image.quality- The desired quality of the newly created image.
-
canResize
abstract Boolean canResize(EncodedImage encodedImage, RotationOptions rotationOptions, ResizeOptions resizeOptions)
Whether the input image is resized to make subsequent decodings faster.
- Parameters:
encodedImage- The EncodedImage that will be transcoded.rotationOptions- The RotationOptions used when transcoding the image.resizeOptions- The ResizeOptions used when transcoding the image.
-
canTranscode
abstract Boolean canTranscode(ImageFormat imageFormat)
Whether the input ImageFormat can be transcoded by the image transcoder.
- Parameters:
imageFormat- The ImageFormat that will be transcoded.
-
getIdentifier
abstract String getIdentifier()
Gets the identifier of the image transcoder. This is mostly used for logging purposes.
-
-
-
-