Class CmsResourceTypeImage.CmsImageAdjuster

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFAULT_ORIENTATION
      Value for EXIF Orientation tag that says that the image is oriented as-is (requires no rotation/mirroring).
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsImageAdjuster​(byte[] content, java.lang.String rootPath, java.util.List<CmsProperty> properties, CmsImageScaler downScaler)
      Creates a new image data container.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void adjust()
      Calculates the image size and adjusts the image dimensions (if required) accoring to the configured image downscale settings.
      byte[] getContent()
      Returns the image content.
      java.util.List<CmsProperty> getProperties()
      Returns the image properties.
      java.lang.String getRootPath()
      Returns the image VFS root path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_ORIENTATION

        public static final int DEFAULT_ORIENTATION
        Value for EXIF Orientation tag that says that the image is oriented as-is (requires no rotation/mirroring).
        See Also:
        Constant Field Values
    • Constructor Detail

      • CmsImageAdjuster

        public CmsImageAdjuster​(byte[] content,
                                java.lang.String rootPath,
                                java.util.List<CmsProperty> properties,
                                CmsImageScaler downScaler)
        Creates a new image data container.

        Parameters:
        content - the image byte content
        rootPath - the image root path
        properties - the image properties
        downScaler - the (optional) image scaler that contains the image downscale settings
    • Method Detail

      • adjust

        public void adjust()
        Calculates the image size and adjusts the image dimensions (if required) accoring to the configured image downscale settings.

        The image dimensions are always calculated from the given image. The internal list of properties is updated with a value for CmsPropertyDefinition.PROPERTY_IMAGE_SIZE that contains the calculated image dimensions.

      • getContent

        public byte[] getContent()
        Returns the image content.

        Returns:
        the image content
      • getProperties

        public java.util.List<CmsPropertygetProperties()
        Returns the image properties.

        Returns:
        the image properties
      • getRootPath

        public java.lang.String getRootPath()
        Returns the image VFS root path.

        Returns:
        the image VFS root path