Package com._1c.g5.v8.dt.ui.util
Class DtImageDataRenderer
java.lang.Object
com._1c.g5.v8.dt.ui.util.DtImageDataRenderer
Utility for safety render data in
ImageData
Note that renderer can convert SVG data to PNG image for showing in SWT widgets
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFormatName(InputStream imageStream) Tries to retrieve image format name fromInputStreamstatic Optional<org.eclipse.swt.graphics.ImageData>render(byte[] imageBuffer) Render specific source inImageDatastatic Optional<org.eclipse.swt.graphics.ImageData>render(ByteArrayInputStream imageBuffer) Render specific source inImageDatastatic Optional<org.eclipse.swt.graphics.ImageData>Render specific source inImageDatastatic Optional<org.eclipse.swt.graphics.ImageData>render(InputStream imageStream) Render specific source inImageData
-
Method Details
-
render
Render specific source inImageData- Parameters:
imageBuffer- the source bytes stream, cannot benull- Returns:
- Optional with
ImageData, or empty if specified source inconsistent or cannot be converted to image
-
render
Render specific source inImageData- Parameters:
imageStream- the source stream, cannot benull- Returns:
- Optional with
ImageData, or empty if specified source inconsistent or cannot be converted to image - See Also:
-
render
Render specific source inImageData- Parameters:
imageBuffer- the source byte array, cannot benull- Returns:
- Optional with
ImageData, or empty if specified source inconsistent or cannot be converted to image - See Also:
-
render
Render specific source inImageData- Parameters:
file- the source image file, cannot benull- Returns:
- Optional with
ImageData, or empty if specified source inconsistent or cannot be converted to image - See Also:
-
getFormatName
Tries to retrieve image format name fromInputStream- Parameters:
imageStream- image input stream, cannot benull- Returns:
- image format name or empty string if not found
- Throws:
IOException
-