Documentation / Marblecore Imaging / Methods / SaveHistogramToImage
SaveHistogramToImage method
Retrieves the histogram graph of the image and replaces the image with the histogram image.
Syntax
Boolean SaveHistogramToImage(nWidth As Number, nHeight As Number, nBackgroundColor As Number, nGraphColor As Number, nBackgroundOpacity As Number, nGraphOpacity As Number, nChannel As Channel)
Return value
Returns true if the function succeeded.
Parameters
Parameter | Type | Required | Description |
nWidth | Number | No | Optional parameter which specifies the width of the histogram. |
nHeight | Number | No | Optional parameter which specifies the height of the histogram. |
nBackgroundColor | Number | No | Optional parameter which specifies the graph background color. |
nGraphColor | Number | No | Optional parameter which specifies the graph bar color. |
nBackgroundOpacity | Number | No | Optional parameter which specifies the opacity of the graph background. |
nGraphOpacity | Number | No | Optional parameter which specifies the opacity of the graph bar. |
nChannel | Channel (Enumeration) | No | Optional parameter which specifies the color channel. |
Example
The example below shows the effect of this method and how to use it. You can slide the marker in the before/after picture to see the difference. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
1
2 MarblecoreImaging.LoadFromFile("example-savehistogramtoimage-before.jpg");
3
4
5 MarblecoreImaging.SaveHistogramToImage();
6
7
8 MarblecoreImaging.SaveToFile("example-savehistogramtoimage-after.jpg");
Category
Histogram
See also
GetHistogramAverage |
GetHistogramCount |
GetHistogramMean |
GetHistogramPercentile |
GetHistogramPixels |
InsertHistogram |
LoadHistogramFromBase64 |
LoadHistogramFromFile |
LoadHistogramFromSerializedStream |
LoadHistogramFromStream |
LoadHistogramFromURL |
SaveHistogramToFile |
SaveHistogramToSerializedStream |
SaveHistogramToStream