Class PictureUtils


  • public class PictureUtils
    extends Object
    Provides picture manipulation helper methods.
    • Method Detail

      • getImageDataByPicture

        public static Optional<org.eclipse.swt.graphics.ImageData> getImageDataByPicture​(Picture picture,
                                                                                         IPictureManifest manifest,
                                                                                         Function<InputStream,​Optional<org.eclipse.swt.graphics.ImageData>> renderer)
        Processes picture's InputStream using renderer and returns obtained ImageData.
        Parameters:
        picture - Picture to be processed, cannot be null.
        manifest - Picture's IPictureManifest
        renderer - Picture renderer that parses picture's InputStream and returns ImageData, cannot be null
        Returns:
        Optional ImageData, never null but may return Optional.empty() in case if renderer didn't manage to parse imput stream for some reason