figToImStream
R2026bStream figure as byte array encoded in specified format
Description
creates a byte array with the image data for the
specified figure. You can specify the encoding
format for the image and whether the byte array is
signed or unsigned.output = figToImStream
(Name=Value)
Examples
Convert current figure to signed PNG formatted byte array
surf(peaks) bytes = figToImStream
Convert a specific figure to JPEG stored in an unsigned byte array
f = figure; surf(peaks); bytes = figToImStream(figHandle=f,... imageFormat='jpg',... outputType='uint8');