Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / SaveHistogramToStream

SaveHistogramToStream method

Saves the histogram of the loaded image to a stream. The stream data contains all binary information which is normally saved to a physic file when you save the histogram image to a file using the SaveHistogramToFile method. You can use the stream to save the image to a file using your own custom function. You can also use the stream to transfer image objects within your application, so you don't have to save the image to (temporary) files. If you just want to transfer histogram image data from one image object to another image object, use the SaveHistogramToSerializedStream method. This gives better performance for internal image data transfers.

Syntax

Stream SaveHistogramToStream(nWidth As Number, nHeight As Number, nBackgroundColor As Number, nGraphColor As Number, nBackgroundOpacity As Number, nGraphOpacity As Number, nChannel As Channel, nFormat As Format, nBPP As Number)

Return value

Returns a stream with the binairy data.

Parameters

ParameterTypeRequiredDescription
nWidthNumberNoOptional parameter which specifies the width of the histogram.
nHeightNumberNoOptional parameter which specifies the height of the histogram.
nBackgroundColorNumberNoOptional parameter which specifies the graph background color.
nGraphColorNumberNoOptional parameter which specifies the graph bar color.
nBackgroundOpacityNumberNoOptional parameter which specifies the opacity of the graph background.
nGraphOpacityNumberNoOptional parameter which specifies the opacity of the graph bar.
nChannelChannel (Enumeration)NoOptional parameter which specifies the color channel.
nFormatFormat (Enumeration)NoOptional parameter containing the format for the file.
nBPPNumberNoOptional parameter containing the number of bits per pixel for the file.

Category

Histogram

See also

GetHistogramAverage | GetHistogramCount | GetHistogramMean | GetHistogramPercentile | GetHistogramPixels | InsertHistogram | LoadHistogramFromBase64 | LoadHistogramFromFile | LoadHistogramFromSerializedStream | LoadHistogramFromStream | LoadHistogramFromURL | SaveHistogramToFile | SaveHistogramToImage | SaveHistogramToSerializedStream | Working with streams