Class Image

    • Method Detail

      • ofRaw

        public static Image ofRaw​(byte[] data,
                                  Image.Format format)
        Constructs an Image utilizing raw image data.
        Parameters:
        data - The raw image data.
        format - The Image.Format of the data.
        Returns:
        An Image with raw image data.
      • ofUrl

        public static Mono<Image> ofUrl​(String url)
        Constructs an Image using the resource at the given url.
        Parameters:
        url - The url of the image.
        Returns:
        A Mono where, upon successful completion, emits an Image with the data at the url. If an error is received, it is emitted through the Mono.
      • getData

        public byte[] getData()
        Gets the raw data of the image.
        Returns:
        The raw data of the image.
      • getFormat

        public Image.Format getFormat()
        Gets the format of the image.
        Returns:
        The format of the image.
      • getHash

        public String getHash()
        Gets the Base64-encoded data of the image.
        Returns:
        The Base64-encoded data of the image.
      • getDataUri

        public String getDataUri()
        Gets a data URI for this image.
        Returns:
        The data URI for this image.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object