public interface AMImageScaler
This interface should be implemented to let Adaptive Media work with new image types that are supported by the out-of-the-box image scalers, or to replace one of the existing image scalers.
Implementations of this interface must be registed as OSGi components. The
mime.type
property defines the MIME type(s) that the image
scaler can handle. The special MIME type *
is used as a fallback
in case there's no image scaler for a specific MIME type.
Image scalers can be replaced by registering an OSGi component with a higher
service.ranking
property.
Modifier and Type | Method and Description |
---|---|
default boolean |
isEnabled()
Returns
true if the image scaler is enabled to scale images. |
AMImageScaledImage |
scaleImage(com.liferay.portal.kernel.repository.model.FileVersion fileVersion,
AMImageConfigurationEntry amImageConfigurationEntry)
Generates a scaled image for the file version that fits the
characteristics specified by the image configuration entry.
|
default boolean isEnabled()
true
if the image scaler is enabled to scale images.true
if the image scaler is enabled to scale imagesAMImageScaledImage scaleImage(com.liferay.portal.kernel.repository.model.FileVersion fileVersion, AMImageConfigurationEntry amImageConfigurationEntry)
fileVersion
- the file version of the image to scaleamImageConfigurationEntry
- the image configuration entry