Class ClipboardImage


  • public class ClipboardImage
    extends ClipboardResult
    Result object for image-based clipboard operations. Read-only.

    Contains image-specific properties such as MIME type, image dimensions, and binary image data.

    • Constructor Detail

      • ClipboardImage

        public ClipboardImage()
    • Method Detail

      • getMimeType

        public String getMimeType()
        Gets the MIME type of the clipboard image.
        Returns:
        the image MIME type (e.g., "image/png", "image/jpeg"), or null if no image data
      • getImageData

        public byte[] getImageData()
        Gets the binary image data from the clipboard.
        Returns:
        the image data as a byte array, or null if no image data or error occurred
      • hasImageData

        public boolean hasImageData()
        Checks if this result contains valid image data.
        Returns:
        true if image data is available and the operation succeeded, false otherwise
      • getWidth

        public int getWidth()
        Gets the image width in pixels.
        Returns:
        the image width, or 0 if not available
      • getHeight

        public int getHeight()
        Gets the image height in pixels.
        Returns:
        the image height, or 0 if not available
      • getSize

        public long getSize()
        Gets the size of the image data in bytes.
        Returns:
        the image size in bytes, or 0 if not available
      • isSupportedFormat

        public boolean isSupportedFormat()
        Checks if the image is of a supported format based on MIME type.
        Returns:
        true if the image format is supported, false otherwise