public class Images
extends java.lang.Object
Constructor and Description |
---|
Images() |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
renderArrayData(MWNumericArray array)
Create a RenderedImage from the data in the given MWNumericArray.
|
public static java.awt.image.BufferedImage renderArrayData(MWNumericArray array)
Example: Converting figure data in a MWArray to a Buffered Image
This example takes an MWArray containing figure data and converts it to a buffered image. It then constructs a byte array the same size as the image.BufferedImage img = Images.renderArrayData((MWNumericArray)mwArray); int estimatedSize = img.getHeight()*img.getWidth()*3; byteOutputStream = new ByteArrayOutputStream(estimatedSize);
array
- input array from which to create a renderedImage© 1994-2017 The MathWorks, Inc. Patents Trademarks