<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2F2D_Graphics%2FImage_Color</id>
		<title>VB.Net Tutorial/2D Graphics/Image Color - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2F2D_Graphics%2FImage_Color"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image_Color&amp;action=history"/>
		<updated>2026-04-05T21:59:01Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image_Color&amp;diff=3365&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image_Color&amp;diff=3365&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image_Color&amp;diff=3366&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image_Color&amp;diff=3366&amp;oldid=prev"/>
				<updated>2010-05-26T12:55:10Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Gray Scale Image==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class GrayScaleImage&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
public class Form1&lt;br /&gt;
  Inherits System.Windows.Forms.Form&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
        Dim g As Graphics = Me.CreateGraphics()&lt;br /&gt;
        g.Clear(Me.BackColor)&lt;br /&gt;
        Dim curBitmap As New Bitmap(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        g.DrawImage(curBitmap, 0, 0, curBitmap.Width, curBitmap.Height) &amp;quot;&lt;br /&gt;
        Dim i As Integer&lt;br /&gt;
        For i = 0 To 100&lt;br /&gt;
            Dim j As Integer&lt;br /&gt;
            For j = 0 To 100&lt;br /&gt;
                Dim curColor As Color = curBitmap.GetPixel(i, j)&lt;br /&gt;
                Dim ret As Integer = (curColor.R + curColor.G + curColor.B) / 3&lt;br /&gt;
                &amp;quot;curBitmap.SetPixel(i, j, Color.FromArgb(ret, ret, ret))&lt;br /&gt;
            Next j&lt;br /&gt;
        Next i&lt;br /&gt;
        g.DrawImage(curBitmap, 0, 0, curBitmap.Width, curBitmap.Height)&lt;br /&gt;
        g.Dispose()&lt;br /&gt;
  End Sub&lt;br /&gt;
  Public Sub New()&lt;br /&gt;
   &lt;br /&gt;
    MyBase.New()&lt;br /&gt;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pick a color from an Image==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class ColorPicker&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing Then&lt;br /&gt;
            If Not (components Is Nothing) Then&lt;br /&gt;
                components.Dispose()&lt;br /&gt;
            End If&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label2 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label3 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu&lt;br /&gt;
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem&lt;br /&gt;
    Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.PictureBox1 = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label2 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.Label3 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.MainMenu1 = New System.Windows.Forms.MainMenu&lt;br /&gt;
        Me.MenuItem1 = New System.Windows.Forms.MenuItem&lt;br /&gt;
        Me.MenuItem2 = New System.Windows.Forms.MenuItem&lt;br /&gt;
        Me.MenuItem3 = New System.Windows.Forms.MenuItem&lt;br /&gt;
        Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;PictureBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D&lt;br /&gt;
        Me.PictureBox1.Dock = System.Windows.Forms.DockStyle.Top&lt;br /&gt;
        Me.PictureBox1.Image = Image.FromFile(&amp;quot;YourFile.bmp&amp;quot;)&lt;br /&gt;
        Me.PictureBox1.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.PictureBox1.Name = &amp;quot;PictureBox1&amp;quot;&lt;br /&gt;
        Me.PictureBox1.Size = New System.Drawing.Size(292, 216)&lt;br /&gt;
        Me.PictureBox1.TabIndex = 0&lt;br /&gt;
        Me.PictureBox1.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(24, 232)&lt;br /&gt;
        Me.Label1.Name = &amp;quot;Label1&amp;quot;&lt;br /&gt;
        Me.Label1.Size = New System.Drawing.Size(56, 24)&lt;br /&gt;
        Me.Label1.TabIndex = 1&lt;br /&gt;
        Me.Label1.Text = &amp;quot;R:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label2.Location = New System.Drawing.Point(112, 232)&lt;br /&gt;
        Me.Label2.Name = &amp;quot;Label2&amp;quot;&lt;br /&gt;
        Me.Label2.Size = New System.Drawing.Size(64, 24)&lt;br /&gt;
        Me.Label2.TabIndex = 2&lt;br /&gt;
        Me.Label2.Text = &amp;quot;G:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Label3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label3.Location = New System.Drawing.Point(208, 232)&lt;br /&gt;
        Me.Label3.Name = &amp;quot;Label3&amp;quot;&lt;br /&gt;
        Me.Label3.Size = New System.Drawing.Size(64, 24)&lt;br /&gt;
        Me.Label3.TabIndex = 3&lt;br /&gt;
        Me.Label3.Text = &amp;quot;B:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MainMenu1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MenuItem1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MenuItem1.Index = 0&lt;br /&gt;
        Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3})&lt;br /&gt;
        Me.MenuItem1.Text = &amp;quot;File&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MenuItem2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MenuItem2.Index = 0&lt;br /&gt;
        Me.MenuItem2.Text = &amp;quot;Open&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;MenuItem3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MenuItem3.Index = 1&lt;br /&gt;
        Me.MenuItem3.Text = &amp;quot;Exit&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(292, 270)&lt;br /&gt;
        Me.Controls.Add(Me.Label3)&lt;br /&gt;
        Me.Controls.Add(Me.Label2)&lt;br /&gt;
        Me.Controls.Add(Me.Label1)&lt;br /&gt;
        Me.Controls.Add(Me.PictureBox1)&lt;br /&gt;
        Me.Menu = Me.MainMenu1&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Dim pic As Bitmap&lt;br /&gt;
    Dim c As System.Drawing.Color&lt;br /&gt;
    Dim xwidth, yheight As Integer&lt;br /&gt;
    Private Sub PictureBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown&lt;br /&gt;
        pic = PictureBox1.Image&lt;br /&gt;
        xwidth = pic.Width&lt;br /&gt;
        yheight = pic.Height&lt;br /&gt;
        If e.X &amp;lt; xwidth And e.Y &amp;lt; yheight Then&lt;br /&gt;
            c = pic.GetPixel(e.X, e.Y)&lt;br /&gt;
            Label1.Text = &amp;quot;R:&amp;quot; + c.R.ToString&lt;br /&gt;
            Label2.Text = &amp;quot;G:&amp;quot; + c.G.ToString&lt;br /&gt;
            Label3.Text = &amp;quot;B:&amp;quot; + c.B.ToString&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click&lt;br /&gt;
        OpenFileDialog1.ShowDialog()&lt;br /&gt;
        PictureBox1.Image = New Bitmap(OpenFileDialog1.FileName)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click&lt;br /&gt;
        End&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Recolor Image==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class RecoloringTranslation&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
public class Form1&lt;br /&gt;
  Inherits System.Windows.Forms.Form&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
        Dim g As Graphics = Me.CreateGraphics()&lt;br /&gt;
        g.Clear(Me.BackColor)&lt;br /&gt;
        Dim curBitmap As New Bitmap(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        Dim ptsArray As Single()() = {New Single() {1, 0, 0, 0, 0}, New Single() {0, 1, 0, 0, 0}, New Single() {0, 0, 1, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0.9F, 0.0F, 0.0F, 0.0F, 1}}&lt;br /&gt;
        Dim clrMatrix As New ColorMatrix(ptsArray)&lt;br /&gt;
        Dim imgAttribs As New ImageAttributes&lt;br /&gt;
        imgAttribs.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default)&lt;br /&gt;
        g.DrawImage(curBitmap, 0, 0, 200, 200)&lt;br /&gt;
        g.DrawImage(curBitmap, New Rectangle(205, 0, 200, 200), 0, 0, curBitmap.Width, curBitmap.Height, GraphicsUnit.Pixel, imgAttribs)&lt;br /&gt;
        curBitmap.Dispose()&lt;br /&gt;
        g.Dispose()&lt;br /&gt;
  End Sub&lt;br /&gt;
  Public Sub New()&lt;br /&gt;
   &lt;br /&gt;
    MyBase.New()&lt;br /&gt;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Recolor image rotation==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class RecoloringRotation&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
public class Form1&lt;br /&gt;
  Inherits System.Windows.Forms.Form&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
        Dim degrees As Single = 45.0F&lt;br /&gt;
        Dim r As Double = degrees * System.Math.PI / 180&lt;br /&gt;
        Dim g As Graphics = Me.CreateGraphics()&lt;br /&gt;
        g.Clear(Me.BackColor)&lt;br /&gt;
        Dim curBitmap As New Bitmap(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        Dim ptsArray As Single()() = {New Single() {CSng(System.Math.Cos(r)), CSng(System.Math.Sin(r)), 0, 0, 0}, New Single() {CSng(-System.Math.Sin(r)), CSng(-System.Math.Cos(r)), 0, 0, 0}, New Single() {0.5F, 0, 1, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0, 0, 0, 0, 1}}&lt;br /&gt;
        Dim clrMatrix As New ColorMatrix(ptsArray)&lt;br /&gt;
        Dim imgAttribs As New ImageAttributes&lt;br /&gt;
        imgAttribs.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default)&lt;br /&gt;
        g.DrawImage(curBitmap, 0, 0, 200, 200)&lt;br /&gt;
        g.DrawImage(curBitmap, New Rectangle(205, 0, 200, 200), 0, 0, curBitmap.Width, curBitmap.Height, GraphicsUnit.Pixel, imgAttribs)&lt;br /&gt;
        curBitmap.Dispose()&lt;br /&gt;
        g.Dispose()&lt;br /&gt;
  End Sub&lt;br /&gt;
  Public Sub New()&lt;br /&gt;
   &lt;br /&gt;
    MyBase.New()&lt;br /&gt;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Recolor image Scaling==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class RecoloringScaling&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
public class Form1&lt;br /&gt;
  Inherits System.Windows.Forms.Form&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
        Dim g As Graphics = Me.CreateGraphics()&lt;br /&gt;
        g.Clear(Me.BackColor)&lt;br /&gt;
        Dim curBitmap As New Bitmap(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        Dim ptsArray As Single()() = {New Single() {1, 0, 0, 0, 0}, New Single() {0, 0.8F, 0, 0, 0}, New Single() {0, 0, 0.5F, 0, 0}, New Single() {0, 0, 0, 0.5F, 0}, New Single() {0, 0, 0, 0, 1}}&lt;br /&gt;
        Dim clrMatrix As New ColorMatrix(ptsArray)&lt;br /&gt;
        Dim imgAttribs As New ImageAttributes&lt;br /&gt;
        imgAttribs.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default)&lt;br /&gt;
        g.DrawImage(curBitmap, 0, 0, 200, 200)&lt;br /&gt;
        g.DrawImage(curBitmap, New Rectangle(205, 0, 200, 200), 0, 0, curBitmap.Width, curBitmap.Height, GraphicsUnit.Pixel, imgAttribs)&lt;br /&gt;
        curBitmap.Dispose()&lt;br /&gt;
        g.Dispose()&lt;br /&gt;
  End Sub&lt;br /&gt;
  Public Sub New()&lt;br /&gt;
   &lt;br /&gt;
    MyBase.New()&lt;br /&gt;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Recolor image shearing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class RecoloringShearing&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
public class Form1&lt;br /&gt;
  Inherits System.Windows.Forms.Form&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
        Dim g As Graphics = Me.CreateGraphics()&lt;br /&gt;
        g.Clear(Me.BackColor)&lt;br /&gt;
        Dim curBitmap As New Bitmap(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        Dim ptsArray As Single()() = {New Single() {1, 0, 0, 0, 0}, New Single() {0, 1, 0, 0, 0}, New Single() {0.5F, 0, 1, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0, 0, 0, 0, 1}}&lt;br /&gt;
        Dim clrMatrix As New ColorMatrix(ptsArray)&lt;br /&gt;
        Dim imgAttribs As New ImageAttributes&lt;br /&gt;
        imgAttribs.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default)&lt;br /&gt;
        g.DrawImage(curBitmap, 0, 0, 200, 200)&lt;br /&gt;
        g.DrawImage(curBitmap, New Rectangle(205, 0, 200, 200), 0, 0, curBitmap.Width, curBitmap.Height, GraphicsUnit.Pixel, imgAttribs)&lt;br /&gt;
        curBitmap.Dispose()&lt;br /&gt;
        g.Dispose()&lt;br /&gt;
  End Sub&lt;br /&gt;
  Public Sub New()&lt;br /&gt;
   &lt;br /&gt;
    MyBase.New()&lt;br /&gt;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>