<?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_by_API%2FSystem.Drawing%2FBitmap</id>
		<title>VB.Net by API/System.Drawing/Bitmap - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_by_API%2FSystem.Drawing%2FBitmap"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_by_API/System.Drawing/Bitmap&amp;action=history"/>
		<updated>2026-04-05T17:58:23Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_by_API/System.Drawing/Bitmap&amp;diff=2113&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_by_API/System.Drawing/Bitmap&amp;diff=2113&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:16Z</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_by_API/System.Drawing/Bitmap&amp;diff=2114&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_by_API/System.Drawing/Bitmap&amp;diff=2114&amp;oldid=prev"/>
				<updated>2010-05-26T12:49:50Z</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;==Bitmap.FromFile(String fileName)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class SetResolutionBitmap&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 newImage As Bitmap = Bitmap.FromFile(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        Dim hDpi As Single = 90&lt;br /&gt;
        Dim vDpi As Single = 90&lt;br /&gt;
        newImage.SetResolution(hDpi, vDpi)&lt;br /&gt;
        &lt;br /&gt;
        e.Graphics.DrawImage(newImage, Me.ClientRectangle)&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&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.GetPixel==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
     Dim form1 As Form1 = new Form1&lt;br /&gt;
     Application.Run(form1)&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
&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;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.Text = &amp;quot;Form1&amp;quot;&lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
  End Sub&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
    Dim bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    Dim c As Color&lt;br /&gt;
    Dim x, y As Int32&lt;br /&gt;
    e.Graphics.DrawImage(bmp, 10, 30)&lt;br /&gt;
    For x = 0 To bmp.Width - 1&lt;br /&gt;
      For y = 0 To bmp.Height - 1&lt;br /&gt;
        c = bmp.GetPixel(x, y)&lt;br /&gt;
        c = Color.FromArgb(c.ToArgb() + 100)&lt;br /&gt;
        bmp.SetPixel(x, y, c)&lt;br /&gt;
      Next&lt;br /&gt;
    Next&lt;br /&gt;
    e.Graphics.DrawImage(bmp, 150, 30)&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.GetPixel(Int x, Int y)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Math&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1()&lt;br /&gt;
       Application.Run(form1)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim bm As New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
        Dim source_bm As New Bitmap(bm)&lt;br /&gt;
    &lt;br /&gt;
        bm.Dispose()&lt;br /&gt;
        picSource.Image = source_bm&lt;br /&gt;
        picDest.Size = picSource.Size&lt;br /&gt;
        Dim dest_bm As New Bitmap(source_bm)&lt;br /&gt;
        For y As Integer = 0 To dest_bm.Height - 1&lt;br /&gt;
            For x As Integer = 0 To dest_bm.Width - 1&lt;br /&gt;
                Dim clr As Color = dest_bm.GetPixel(x, y)&lt;br /&gt;
                clr = Color.FromArgb(255,255 - clr.R,255 - clr.G,255 - clr.B)&lt;br /&gt;
                dest_bm.SetPixel(x, y, clr)&lt;br /&gt;
            Next x&lt;br /&gt;
        Next y&lt;br /&gt;
        picDest.Image = dest_bm&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.SplitContainer1 = New System.Windows.Forms.SplitContainer&lt;br /&gt;
        Me.picSource = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.picDest = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.SplitContainer1.Panel1.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.SuspendLayout()&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.SplitContainer1.Location = New System.Drawing.Point(0, 24)&lt;br /&gt;
        Me.SplitContainer1.Name = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel1.Controls.Add(Me.picSource)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel2.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel2.Controls.Add(Me.picDest)&lt;br /&gt;
        Me.SplitContainer1.Size = New System.Drawing.Size(522, 249)&lt;br /&gt;
        Me.SplitContainer1.SplitterDistance = 270&lt;br /&gt;
        Me.SplitContainer1.TabIndex = 1&lt;br /&gt;
        Me.SplitContainer1.Text = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picSource&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picSource.AutoSize = True&lt;br /&gt;
        Me.picSource.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picSource.Name = &amp;quot;picSource&amp;quot;&lt;br /&gt;
        Me.picSource.Size = New System.Drawing.Size(208, 184)&lt;br /&gt;
        Me.picSource.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picSource.TabIndex = 0&lt;br /&gt;
        Me.picSource.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picDest&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picDest.AutoSize = True&lt;br /&gt;
        Me.picDest.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picDest.Name = &amp;quot;picDest&amp;quot;&lt;br /&gt;
        Me.picDest.Size = New System.Drawing.Size(184, 184)&lt;br /&gt;
        Me.picDest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picDest.TabIndex = 1&lt;br /&gt;
        Me.picDest.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(522, 273)&lt;br /&gt;
        Me.Controls.Add(Me.SplitContainer1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;InvertImageGetSetPixels&amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel1.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel2.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.ResumeLayout(False)&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer&lt;br /&gt;
    Friend WithEvents picSource As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents picDest As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.Height==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
    Dim Bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    Console.WriteLine(Bmp.Height.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Width.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.VerticalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.HorizontalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PixelFormat.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Size.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PhysicalDimension.ToString())&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.MakeTransparent==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
public class MakeTransparentBitmap&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;
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click&lt;br /&gt;
        Me.Close()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint&lt;br /&gt;
        Dim bm As Bitmap = new Bitmap(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        bm.MakeTransparent(bm.GetPixel(1, 1))&lt;br /&gt;
        e.Graphics.DrawImage(bm, 0, 0)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.Palette==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
    Dim cp As ColorPalette&lt;br /&gt;
    Dim bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    cp = bmp.Palette&lt;br /&gt;
    Dim c As Color&lt;br /&gt;
    For Each c In cp.Entries&lt;br /&gt;
      Console.WriteLine( c.ToString())&lt;br /&gt;
    Next&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.PhysicalDimension==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
    Dim Bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    Console.WriteLine(Bmp.Height.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Width.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.VerticalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.HorizontalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PixelFormat.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Size.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PhysicalDimension.ToString())&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.PixelFormat==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
    Dim Bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    Console.WriteLine(Bmp.Height.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Width.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.VerticalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.HorizontalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PixelFormat.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Size.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PhysicalDimension.ToString())&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.Save(String fileName, ImageFormat if)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Collections.Generic&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
        Dim bm As New Bitmap(256, 256)&lt;br /&gt;
        &amp;quot; Draw on it.&lt;br /&gt;
        Dim gr As Graphics = Graphics.FromImage(bm)&lt;br /&gt;
        gr.Clear(Color.White)&lt;br /&gt;
        gr.DrawEllipse(Pens.Red, 0, 0, bm.Width - 1, bm.Height - 1)&lt;br /&gt;
        gr.DrawLine(Pens.Green, 0, 0, bm.Width - 1, bm.Height - 1)&lt;br /&gt;
        gr.DrawLine(Pens.Blue, bm.Width - 1, 0, 0, bm.Height - 1)&lt;br /&gt;
        &amp;quot; Save the result as a JPEG file.&lt;br /&gt;
        bm.Save(&amp;quot;test.gif&amp;quot;, ImageFormat.Gif)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.SetPixel(Int x, Int y, Color clr)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Math&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1()&lt;br /&gt;
       Application.Run(form1)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim bm As New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
        Dim source_bm As New Bitmap(bm)&lt;br /&gt;
    &lt;br /&gt;
        bm.Dispose()&lt;br /&gt;
        picSource.Image = source_bm&lt;br /&gt;
        picDest.Size = picSource.Size&lt;br /&gt;
        Dim dest_bm As New Bitmap(source_bm)&lt;br /&gt;
        For y As Integer = 0 To dest_bm.Height - 1&lt;br /&gt;
            For x As Integer = 0 To dest_bm.Width - 1&lt;br /&gt;
                Dim clr As Color = dest_bm.GetPixel(x, y)&lt;br /&gt;
                clr = Color.FromArgb(255,255 - clr.R,255 - clr.G,255 - clr.B)&lt;br /&gt;
                dest_bm.SetPixel(x, y, clr)&lt;br /&gt;
            Next x&lt;br /&gt;
        Next y&lt;br /&gt;
        picDest.Image = dest_bm&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.SplitContainer1 = New System.Windows.Forms.SplitContainer&lt;br /&gt;
        Me.picSource = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.picDest = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.SplitContainer1.Panel1.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.SuspendLayout()&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.SplitContainer1.Location = New System.Drawing.Point(0, 24)&lt;br /&gt;
        Me.SplitContainer1.Name = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel1.Controls.Add(Me.picSource)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel2.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel2.Controls.Add(Me.picDest)&lt;br /&gt;
        Me.SplitContainer1.Size = New System.Drawing.Size(522, 249)&lt;br /&gt;
        Me.SplitContainer1.SplitterDistance = 270&lt;br /&gt;
        Me.SplitContainer1.TabIndex = 1&lt;br /&gt;
        Me.SplitContainer1.Text = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picSource&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picSource.AutoSize = True&lt;br /&gt;
        Me.picSource.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picSource.Name = &amp;quot;picSource&amp;quot;&lt;br /&gt;
        Me.picSource.Size = New System.Drawing.Size(208, 184)&lt;br /&gt;
        Me.picSource.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picSource.TabIndex = 0&lt;br /&gt;
        Me.picSource.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picDest&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picDest.AutoSize = True&lt;br /&gt;
        Me.picDest.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picDest.Name = &amp;quot;picDest&amp;quot;&lt;br /&gt;
        Me.picDest.Size = New System.Drawing.Size(184, 184)&lt;br /&gt;
        Me.picDest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picDest.TabIndex = 1&lt;br /&gt;
        Me.picDest.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(522, 273)&lt;br /&gt;
        Me.Controls.Add(Me.SplitContainer1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;InvertImageGetSetPixels&amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel1.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel2.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.ResumeLayout(False)&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer&lt;br /&gt;
    Friend WithEvents picSource As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents picDest As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.SetResolution(Single h, Single v)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class SetResolutionBitmap&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 newImage As Bitmap = Bitmap.FromFile(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        Dim hDpi As Single = 90&lt;br /&gt;
        Dim vDpi As Single = 90&lt;br /&gt;
        newImage.SetResolution(hDpi, vDpi)&lt;br /&gt;
        &lt;br /&gt;
        e.Graphics.DrawImage(newImage, Me.ClientRectangle)&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&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.VerticalResolution==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
    Dim Bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    Console.WriteLine(Bmp.Height.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Width.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.VerticalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.HorizontalResolution.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PixelFormat.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.Size.ToString())&lt;br /&gt;
    Console.WriteLine(Bmp.PhysicalDimension.ToString())&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Bitmap.Width==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Math&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1()&lt;br /&gt;
       Application.Run(form1)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim bm As New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
        Dim source_bm As New Bitmap(bm)&lt;br /&gt;
    &lt;br /&gt;
        bm.Dispose()&lt;br /&gt;
        picSource.Image = source_bm&lt;br /&gt;
        picDest.Size = picSource.Size&lt;br /&gt;
        Dim dest_bm As New Bitmap(source_bm)&lt;br /&gt;
        For y As Integer = 0 To dest_bm.Height - 1&lt;br /&gt;
            For x As Integer = 0 To dest_bm.Width - 1&lt;br /&gt;
                Dim clr As Color = dest_bm.GetPixel(x, y)&lt;br /&gt;
                clr = Color.FromArgb(255,255 - clr.R,255 - clr.G,255 - clr.B)&lt;br /&gt;
                dest_bm.SetPixel(x, y, clr)&lt;br /&gt;
            Next x&lt;br /&gt;
        Next y&lt;br /&gt;
        picDest.Image = dest_bm&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.SplitContainer1 = New System.Windows.Forms.SplitContainer&lt;br /&gt;
        Me.picSource = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.picDest = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.SplitContainer1.Panel1.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.SuspendLayout()&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.SplitContainer1.Location = New System.Drawing.Point(0, 24)&lt;br /&gt;
        Me.SplitContainer1.Name = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel1.Controls.Add(Me.picSource)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel2.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel2.Controls.Add(Me.picDest)&lt;br /&gt;
        Me.SplitContainer1.Size = New System.Drawing.Size(522, 249)&lt;br /&gt;
        Me.SplitContainer1.SplitterDistance = 270&lt;br /&gt;
        Me.SplitContainer1.TabIndex = 1&lt;br /&gt;
        Me.SplitContainer1.Text = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picSource&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picSource.AutoSize = True&lt;br /&gt;
        Me.picSource.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picSource.Name = &amp;quot;picSource&amp;quot;&lt;br /&gt;
        Me.picSource.Size = New System.Drawing.Size(208, 184)&lt;br /&gt;
        Me.picSource.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picSource.TabIndex = 0&lt;br /&gt;
        Me.picSource.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picDest&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picDest.AutoSize = True&lt;br /&gt;
        Me.picDest.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picDest.Name = &amp;quot;picDest&amp;quot;&lt;br /&gt;
        Me.picDest.Size = New System.Drawing.Size(184, 184)&lt;br /&gt;
        Me.picDest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picDest.TabIndex = 1&lt;br /&gt;
        Me.picDest.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(522, 273)&lt;br /&gt;
        Me.Controls.Add(Me.SplitContainer1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;InvertImageGetSetPixels&amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel1.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel2.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.ResumeLayout(False)&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer&lt;br /&gt;
    Friend WithEvents picSource As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents picDest As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==New Bitmap==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Math&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
       Dim form1 As Form = New Form1()&lt;br /&gt;
       Application.Run(form1)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        Dim bm As New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
        Dim source_bm As New Bitmap(bm)&lt;br /&gt;
    &lt;br /&gt;
        bm.Dispose()&lt;br /&gt;
        picSource.Image = source_bm&lt;br /&gt;
        picDest.Size = picSource.Size&lt;br /&gt;
        Dim dest_bm As New Bitmap(source_bm)&lt;br /&gt;
        For y As Integer = 0 To dest_bm.Height - 1&lt;br /&gt;
            For x As Integer = 0 To dest_bm.Width - 1&lt;br /&gt;
                Dim clr As Color = dest_bm.GetPixel(x, y)&lt;br /&gt;
                clr = Color.FromArgb(255,255 - clr.R,255 - clr.G,255 - clr.B)&lt;br /&gt;
                dest_bm.SetPixel(x, y, clr)&lt;br /&gt;
            Next x&lt;br /&gt;
        Next y&lt;br /&gt;
        picDest.Image = dest_bm&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.SplitContainer1 = New System.Windows.Forms.SplitContainer&lt;br /&gt;
        Me.picSource = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.picDest = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.SplitContainer1.Panel1.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.SuspendLayout()&lt;br /&gt;
        Me.SplitContainer1.SuspendLayout()&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill&lt;br /&gt;
        Me.SplitContainer1.Location = New System.Drawing.Point(0, 24)&lt;br /&gt;
        Me.SplitContainer1.Name = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel1.Controls.Add(Me.picSource)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SplitContainer1.Panel2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel2.AutoScroll = True&lt;br /&gt;
        Me.SplitContainer1.Panel2.Controls.Add(Me.picDest)&lt;br /&gt;
        Me.SplitContainer1.Size = New System.Drawing.Size(522, 249)&lt;br /&gt;
        Me.SplitContainer1.SplitterDistance = 270&lt;br /&gt;
        Me.SplitContainer1.TabIndex = 1&lt;br /&gt;
        Me.SplitContainer1.Text = &amp;quot;SplitContainer1&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picSource&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picSource.AutoSize = True&lt;br /&gt;
        Me.picSource.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picSource.Name = &amp;quot;picSource&amp;quot;&lt;br /&gt;
        Me.picSource.Size = New System.Drawing.Size(208, 184)&lt;br /&gt;
        Me.picSource.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picSource.TabIndex = 0&lt;br /&gt;
        Me.picSource.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;picDest&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.picDest.AutoSize = True&lt;br /&gt;
        Me.picDest.Location = New System.Drawing.Point(0, 0)&lt;br /&gt;
        Me.picDest.Name = &amp;quot;picDest&amp;quot;&lt;br /&gt;
        Me.picDest.Size = New System.Drawing.Size(184, 184)&lt;br /&gt;
        Me.picDest.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize&lt;br /&gt;
        Me.picDest.TabIndex = 1&lt;br /&gt;
        Me.picDest.TabStop = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(522, 273)&lt;br /&gt;
        Me.Controls.Add(Me.SplitContainer1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;InvertImageGetSetPixels&amp;quot;&lt;br /&gt;
        Me.SplitContainer1.Panel1.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel1.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.Panel2.ResumeLayout(False)&lt;br /&gt;
        Me.SplitContainer1.Panel2.PerformLayout()&lt;br /&gt;
        Me.SplitContainer1.ResumeLayout(False)&lt;br /&gt;
        CType(Me.picSource, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        CType(Me.picDest, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer&lt;br /&gt;
    Friend WithEvents picSource As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents picDest As System.Windows.Forms.PictureBox&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==New Bitmap(Int w, Int y)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Collections.Generic&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
   Shared Sub Main()&lt;br /&gt;
        Dim bm As New Bitmap(256, 256)&lt;br /&gt;
        &amp;quot; Draw on it.&lt;br /&gt;
        Dim gr As Graphics = Graphics.FromImage(bm)&lt;br /&gt;
        gr.Clear(Color.White)&lt;br /&gt;
        gr.DrawEllipse(Pens.Red, 0, 0, bm.Width - 1, bm.Height - 1)&lt;br /&gt;
        gr.DrawLine(Pens.Green, 0, 0, bm.Width - 1, bm.Height - 1)&lt;br /&gt;
        gr.DrawLine(Pens.Blue, bm.Width - 1, 0, 0, bm.Height - 1)&lt;br /&gt;
        &amp;quot; Save the result as a JPEG file.&lt;br /&gt;
        bm.Save(&amp;quot;test.Bmp&amp;quot;, ImageFormat.Bmp)&lt;br /&gt;
   End Sub &lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==New Bitmap(String fileName)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Drawing.Drawing2D&lt;br /&gt;
Imports System.Drawing.Text&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
Public Class MainClass&lt;br /&gt;
  Shared Sub Main()&lt;br /&gt;
     Dim form1 As Form1 = new Form1&lt;br /&gt;
     Application.Run(form1)&lt;br /&gt;
  End Sub&lt;br /&gt;
  &lt;br /&gt;
End Class&lt;br /&gt;
&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;
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
    Me.ClientSize = New System.Drawing.Size(292, 273)&lt;br /&gt;
    Me.Text = &amp;quot;Form1&amp;quot;&lt;br /&gt;
  End Sub&lt;br /&gt;
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
  End Sub&lt;br /&gt;
  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)&lt;br /&gt;
    Dim bmp As Bitmap = New Bitmap(&amp;quot;figure2.bmp&amp;quot;)&lt;br /&gt;
    Dim c As Color&lt;br /&gt;
    Dim x, y As Int32&lt;br /&gt;
    e.Graphics.DrawImage(bmp, 10, 30)&lt;br /&gt;
    For x = 0 To bmp.Width - 1&lt;br /&gt;
      For y = 0 To bmp.Height - 1&lt;br /&gt;
        c = bmp.GetPixel(x, y)&lt;br /&gt;
        c = Color.FromArgb(c.ToArgb() + 100)&lt;br /&gt;
        bmp.SetPixel(x, y, c)&lt;br /&gt;
      Next&lt;br /&gt;
    Next&lt;br /&gt;
    e.Graphics.DrawImage(bmp, 150, 30)&lt;br /&gt;
  End Sub&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>