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 » 2016-06-09T10:07:25-07:00

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: 1562
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Histogram?

Post by dlemstra » 2016-06-10T01:51:44-07:00

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 » 2016-06-10T06:52:15-07:00

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