Histogram?

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
Vancete
Posts: 2
Joined: 2016-06-09T10:05:53-07:00
Authentication code: 1151

Histogram?

Post by Vancete »

Hello!

I'm trying to show the histogram as image in my project, but the image.histogram returns a Collection.

What should I do with that?

Thanks in advance :D
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Histogram?

Post by dlemstra »

The Histogram method returns a dictionary of colors and the number of times that color is found in the image. If you want to write an image of the histogram of an image you will need to do the following:

Code: Select all

image.Write(@"histogram:c:\your\folder\yourFile.jpg");
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Vancete
Posts: 2
Joined: 2016-06-09T10:05:53-07:00
Authentication code: 1151

Re: Histogram?

Post by Vancete »

dlemstra wrote:The Histogram method returns a dictionary of colors and the number of times that color is found in the image. If you want to write an image of the histogram of an image you will need to do the following:

Code: Select all

image.Write(@"histogram:c:\your\folder\yourFile.jpg");
Is there any way to get directly a Bitmap instead of writing it to a file?

Thanks for the answer :D
Post Reply