MediaMlImageBuilder

  • MediaMlImageBuilder is used to build an MlImage from an Image .

  • You should not modify the content of the Image after it's passed to the builder.

  • MediaImageExtractor can be used to get the original Image back from the builder.

  • The constructor requires a mandatory Image object.

  • You can set the rotation of the MlImage using the setRotation method before building.

public class MediaMlImageBuilder extends Object

Builds MlImage from Image .

Once Image is passed in, to keep data integrity you shouldn't modify content in it.

Use MediaImageExtractor to get Image you passed in.

Public Constructor Summary

MediaMlImageBuilder ( Image mediaImage)
Creates the builder with a mandatory Image .

Public Method Summary

MlImage
build ()
Builds an MlImage instance.
MediaMlImageBuilder
setRotation (int rotation)
Sets value for MlImage.getRotation() .

Inherited Method Summary

Public Constructors

public MediaMlImageBuilder ( Image mediaImage)

Creates the builder with a mandatory Image .

Also calls setRotation(int) to set the optional properties. If not set, the values will be set with default:

  • rotation: 0
Parameters
mediaImage
image data object.

Public Methods

public MlImage build ()

Builds an MlImage instance.

public MediaMlImageBuilder setRotation (int rotation)

Sets value for MlImage.getRotation() .

Throws
if the rotation value is not 0, 90, 180 or 270.
Create a Mobile Website
View Site in Mobile | Classic
Share by: