Click here to Skip to main content
15,885,546 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 77.9K   7.4K   74  
This program demonstrates the graphics effects of drawing an image with a ColorMatrix.
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="dt" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="dt">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Red" type="xs:float" minOccurs="0" />
                <xs:element name="Green" type="xs:float" minOccurs="0" />
                <xs:element name="Blue" type="xs:float" minOccurs="0" />
                <xs:element name="Alpha" type="xs:float" minOccurs="0" />
                <xs:element name="Int" type="xs:float" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <dt>
    <Red>0</Red>
    <Green>0</Green>
    <Blue>0</Blue>
    <Alpha>0</Alpha>
    <Int>0</Int>
  </dt>
  <dt>
    <Red>0</Red>
    <Green>-2</Green>
    <Blue>0</Blue>
    <Alpha>0</Alpha>
    <Int>0</Int>
  </dt>
  <dt>
    <Red>0</Red>
    <Green>0</Green>
    <Blue>0</Blue>
    <Alpha>0</Alpha>
    <Int>0</Int>
  </dt>
  <dt>
    <Red>0</Red>
    <Green>0</Green>
    <Blue>0</Blue>
    <Alpha>1</Alpha>
    <Int>0</Int>
  </dt>
  <dt>
    <Red>0</Red>
    <Green>2</Green>
    <Blue>0</Blue>
    <Alpha>0</Alpha>
    <Int>1</Int>
  </dt>
</NewDataSet>

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