Click here to Skip to main content
15,895,746 members
Articles / Programming Languages / C#

Color Matrix Image Drawing Effects

Rate me:
Please Sign up or sign in to vote.
4.98/5 (20 votes)
26 Apr 2010CPOL9 min read 78K   7.4K   74  
This program demonstrates the graphics effects of drawing an image with a ColorMatrix.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Reflection;        // help
using System.IO;

namespace ColorMatrix_ns
{
    /// <summary>
    /// Display embedded HTML help in .Net webbrowser window.
    /// Embedded html contains inlined base64 encoded images.
    /// 
    /// Author: Dennis Lang  2010     
    /// http://home.comcast.net/~lang.dennis/
    /// 
    /// </summary>
    public partial class HelpDialog : Form
    {
        public HelpDialog()
        {
            InitializeComponent();

            // Attach the embedded html resource
            Assembly a = Assembly.GetExecutingAssembly();
            Stream htmlStream = a.GetManifestResourceStream("ColorMatrix_ns.colormatrix.html");
            this.webBrowser.DocumentStream = htmlStream;
        }

        private void closeBtn_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) IBM / WSI
United States United States
I love C/C++ for its speed and power and C#/Visual Studio for quick application development.

Unix/Linux is my favorite OS

Android Studio is the best IDE I have used.

Comments and Discussions