<?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</id>
		<title>VB.Net Tutorial/2D Graphics/Image - История изменений</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"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image&amp;action=history"/>
		<updated>2026-04-05T19:14:18Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/2D_Graphics/Image&amp;diff=3239&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&amp;diff=3239&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&amp;diff=3240&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&amp;diff=3240&amp;oldid=prev"/>
				<updated>2010-05-26T12:54:40Z</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;==Get Image PropertyItems==&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.Imaging&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 MainClass&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Dim curImage As Image = Image.FromFile(&amp;quot;yourfile.JPG&amp;quot;)&lt;br /&gt;
        Dim imgProperties As PropertyItem() = curImage.PropertyItems&lt;br /&gt;
        Console.WriteLine(imgProperties.Length.ToString())&lt;br /&gt;
        Dim i As Integer&lt;br /&gt;
        For i = 0 To imgProperties.Length - 1&lt;br /&gt;
            Console.WriteLine(&amp;quot;Id :&amp;quot; + imgProperties(i).Id.ToString)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Value:&amp;quot; + BitConverter.ToString(imgProperties(i).Value))&lt;br /&gt;
        Next i&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Image Convert==&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&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Imports System.Collections&lt;br /&gt;
Imports System.ruponentModel&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Data&lt;br /&gt;
Imports System.Drawing.Imaging&lt;br /&gt;
&lt;br /&gt;
public class ImageConverter&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 curImage As Image&lt;br /&gt;
#Region &amp;quot; Windows Form Designer generated code &amp;quot;&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        &amp;quot;This call is required by the Windows Form Designer.&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
        &amp;quot;Add any initialization after the InitializeComponent() call&lt;br /&gt;
    End Sub&lt;br /&gt;
    &amp;quot;Form overrides dispose to clean up the component list.&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;
    &amp;quot;Required by the Windows Form Designer&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;quot;NOTE: The following procedure is required by the Windows Form Designer&lt;br /&gt;
    &amp;quot;It can be modified using the Windows Form Designer.  &lt;br /&gt;
    &amp;quot;Do not modify it using the code editor.&lt;br /&gt;
    Friend WithEvents SaveFormatCombo As System.Windows.Forms.ruboBox&lt;br /&gt;
    Friend WithEvents ConvertToBtn As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents ViewImgBtn As System.Windows.Forms.Button&lt;br /&gt;
    Friend WithEvents pictureBox1 As System.Windows.Forms.PictureBox&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.SaveFormatCombo = New System.Windows.Forms.ruboBox&lt;br /&gt;
        Me.ConvertToBtn = New System.Windows.Forms.Button&lt;br /&gt;
        Me.ViewImgBtn = New System.Windows.Forms.Button&lt;br /&gt;
        Me.pictureBox1 = New System.Windows.Forms.PictureBox&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;SaveFormatCombo&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.SaveFormatCombo.Items.AddRange(New Object() {&amp;quot;bmp&amp;quot;, &amp;quot;jpg&amp;quot;, &amp;quot;wmf&amp;quot;, &amp;quot;gif&amp;quot;, &amp;quot;emf&amp;quot;})&lt;br /&gt;
        Me.SaveFormatCombo.Location = New System.Drawing.Point(404, 214)&lt;br /&gt;
        Me.SaveFormatCombo.Name = &amp;quot;SaveFormatCombo&amp;quot;&lt;br /&gt;
        Me.SaveFormatCombo.Size = New System.Drawing.Size(96, 21)&lt;br /&gt;
        Me.SaveFormatCombo.TabIndex = 7&lt;br /&gt;
        Me.SaveFormatCombo.Text = &amp;quot;bmp&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ConvertToBtn&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ConvertToBtn.Location = New System.Drawing.Point(404, 182)&lt;br /&gt;
        Me.ConvertToBtn.Name = &amp;quot;ConvertToBtn&amp;quot;&lt;br /&gt;
        Me.ConvertToBtn.Size = New System.Drawing.Size(96, 24)&lt;br /&gt;
        Me.ConvertToBtn.TabIndex = 6&lt;br /&gt;
        Me.ConvertToBtn.Text = &amp;quot;Convert Now&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;ViewImgBtn&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.ViewImgBtn.Location = New System.Drawing.Point(404, 38)&lt;br /&gt;
        Me.ViewImgBtn.Name = &amp;quot;ViewImgBtn&amp;quot;&lt;br /&gt;
        Me.ViewImgBtn.Size = New System.Drawing.Size(88, 24)&lt;br /&gt;
        Me.ViewImgBtn.TabIndex = 5&lt;br /&gt;
        Me.ViewImgBtn.Text = &amp;quot;View Image&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;pictureBox1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.pictureBox1.Location = New System.Drawing.Point(4, 30)&lt;br /&gt;
        Me.pictureBox1.Name = &amp;quot;pictureBox1&amp;quot;&lt;br /&gt;
        Me.pictureBox1.Size = New System.Drawing.Size(368, 328)&lt;br /&gt;
        Me.pictureBox1.TabIndex = 4&lt;br /&gt;
        Me.pictureBox1.TabStop = False&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(504, 389)&lt;br /&gt;
        Me.Controls.Add(Me.SaveFormatCombo)&lt;br /&gt;
        Me.Controls.Add(Me.ConvertToBtn)&lt;br /&gt;
        Me.Controls.Add(Me.ViewImgBtn)&lt;br /&gt;
        Me.Controls.Add(Me.pictureBox1)&lt;br /&gt;
        Me.Name = &amp;quot;Form1&amp;quot;&lt;br /&gt;
        Me.Text = &amp;quot;GDI+ Image Convertor&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
#End Region&lt;br /&gt;
    Private Sub ViewImgBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ViewImgBtn.Click&lt;br /&gt;
        Dim openDlg As New OpenFileDialog   &amp;quot;&lt;br /&gt;
        openDlg.Filter = &amp;quot;All Image files|*.bmp;*.gif;*.jpg;*.ico;*.emf,*.wmf|Bitmap Files(*.bmp;*.gif;*.jpg;*.ico)|*.bmp;*.gif;*.jpg;*.ico|Meta Files(*.emf;*.wmf)|*.emf;*.wmf&amp;quot;&lt;br /&gt;
        Dim filter As String = openDlg.Filter&lt;br /&gt;
        openDlg.InitialDirectory = Environment.CurrentDirectory&lt;br /&gt;
        openDlg.Title = &amp;quot;Open Image File&amp;quot;&lt;br /&gt;
        openDlg.ShowHelp = True&lt;br /&gt;
        If openDlg.ShowDialog() = DialogResult.OK Then&lt;br /&gt;
            curImage = Image.FromFile(openDlg.FileName)&lt;br /&gt;
            pictureBox1.Width = curImage.Width&lt;br /&gt;
            pictureBox1.Height = curImage.Height&lt;br /&gt;
            pictureBox1.Image = curImage&lt;br /&gt;
            pictureBox1.Visible = True&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub ConvertToBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConvertToBtn.Click&lt;br /&gt;
        Dim imgStream As New System.IO.MemoryStream&lt;br /&gt;
        Dim imgConverter As New ImageConverter&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Image Properties==&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 ImageProperty&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 curImage As Image = Image.FromFile(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        curImage.RotateFlip(RotateFlipType.RotateNoneFlipXY)&lt;br /&gt;
        e.Graphics.DrawImage(curImage, New Rectangle(0, 0, 100, 100))&lt;br /&gt;
        Console.WriteLine(&amp;quot;Size:&amp;quot; + curImage.Size.ToString)&lt;br /&gt;
        Console.WriteLine(&amp;quot; RawFormat:&amp;quot; + curImage.RawFormat.ToString)&lt;br /&gt;
        Console.WriteLine(&amp;quot; Vertical Resolution:&amp;quot; + curImage.VerticalResolution.ToString)&lt;br /&gt;
        Console.WriteLine(&amp;quot; Horizontal Resolution:&amp;quot; + curImage.HorizontalResolution.ToString)&lt;br /&gt;
        Console.WriteLine(&amp;quot; PixelFormat:&amp;quot; + curImage.PixelFormat.ToString)&lt;br /&gt;
        Console.WriteLine(&amp;quot; Flags:&amp;quot; + curImage.Flags.ToString)&lt;br /&gt;
        &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;
==Save Image with different size==&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.Imaging&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 SaveImageWithDifferentSize&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 curImage As Image = Image.FromFile(&amp;quot;yourfile.jpg&amp;quot;)&lt;br /&gt;
        curImage.RotateFlip(RotateFlipType.RotateNoneFlipXY)&lt;br /&gt;
        e.Graphics.DrawImage(curImage, New Rectangle(0, 0, 100, 100))&lt;br /&gt;
        Dim newImage As New Bitmap(curImage, New Size(100, 100))&lt;br /&gt;
        newImage.Save(&amp;quot;newImage.bmp&amp;quot;, ImageFormat.Bmp)&lt;br /&gt;
        &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>