1. Este site usa cookies. Ao continuar a usar este site está a concordar com o nosso uso de cookies. Saber Mais.

Image Zoom c#

Discussão em 'Programação' iniciada por Nody, 5 de Fevereiro de 2009. (Respostas: 4; Visualizações: 2275)

  1. Nody

    Nody Power Member

    Tou a fazer um editor de imagens em c# e estou com dificuldade em fazer o Zoom da imagem.

    As imagens são carregadas para dentro de uma picturebox e trabalho apenas com .bmp

    A dificuldade está em fazer Zoom de imagens, visto que as proprierdades Image.Height; e Image.Width; são apenas get, não dando para fazer set do seu conteúdo.

    Any1?

    Cumps
     
  2. Fiz uma pequena busca no google, e encontrei isto, ve se te interessa

    Código:
    [B][COLOR=#3f7f5f]/*[/COLOR]
    [COLOR=#3f7f5f]Professional Windows GUI Programming Using C#[/COLOR]
    [COLOR=#3f7f5f]by Jay Glynn, Csaba Torok, Richard Conway, Wahid Choudhury, [/COLOR]
    [COLOR=#ffffff]   [/COLOR][COLOR=#3f7f5f]Zach Greenvoss, Shripad Kulkarni, Neil Whitlow[/COLOR]
    
    [COLOR=#3f7f5f]Publisher: Peer Information[/COLOR]
    [COLOR=#3f7f5f]ISBN: 1861007663[/COLOR]
    [COLOR=#3f7f5f]*/[/COLOR]
    
    [COLOR=#7f0055][B]using [/B][/COLOR][COLOR=#000000]System;[/COLOR]
    [COLOR=#7f0055][B]using [/B][/COLOR][COLOR=#000000]System.Drawing;[/COLOR]
    [COLOR=#7f0055][B]using [/B][/COLOR][COLOR=#000000]System.Collections;[/COLOR]
    [COLOR=#7f0055][B]using [/B][/COLOR][COLOR=#000000]System.ComponentModel;[/COLOR]
    [COLOR=#7f0055][B]using [/B][/COLOR][COLOR=#000000]System.Windows.Forms;[/COLOR]
    [COLOR=#7f0055][B]using [/B][/COLOR][COLOR=#000000]System.Data;[/COLOR]
    
    [COLOR=#000000]namespace ImageZoom[/COLOR]
    [COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]    [/COLOR][COLOR=#3f7f5f]/// <summary>[/COLOR]
    [COLOR=#ffffff]    [/COLOR][COLOR=#3f7f5f]/// Summary description for ImageZoom.[/COLOR]
    [COLOR=#ffffff]    [/COLOR][COLOR=#3f7f5f]/// </summary>[/COLOR]
    [COLOR=#ffffff]    [/COLOR][COLOR=#7f0055][B]public class [/B][/COLOR][COLOR=#000000]ImageZoom1 : System.Windows.Forms.Form[/COLOR]
    [COLOR=#ffffff]    [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.Label label1;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.GroupBox groupBox1;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton radioButton1;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton radioButton2;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton radioButton3;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton radioButton4;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.Label label2;[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.Windows.Forms.CheckBox checkBox1;[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]Image im = [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]Image im2 = [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000];[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// <summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// Required designer variable.[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// </summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#000000]System.ComponentModel.Container components = [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000];[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]public [/B][/COLOR][COLOR=#000000]ImageZoom1[/COLOR][COLOR=#000000]()[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]//[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// Required for Windows Form Designer support[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]//[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]InitializeComponent[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].Text = [/COLOR][COLOR=#2a00ff]"Zooming"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.Text = [/COLOR][COLOR=#2a00ff]""[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.Text = [/COLOR][COLOR=#2a00ff]"Zoom"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.Text = [/COLOR][COLOR=#2a00ff]"Paint"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Checked = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.CheckedChanged += [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.EventHandler[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButtons_CheckedChanged[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.CheckedChanged += [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.EventHandler[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButtons_CheckedChanged[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.CheckedChanged += [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.EventHandler[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButtons_CheckedChanged[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.CheckedChanged += [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.EventHandler[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButtons_CheckedChanged[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]//[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// TODO: Add any constructor code after InitializeComponent call[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]//[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// <summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// Clean up any resources being used.[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// </summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]protected [/B][/COLOR][COLOR=#000000]override [/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]Dispose[/COLOR][COLOR=#000000]( [/COLOR][COLOR=#000000]bool disposing [/COLOR][COLOR=#000000])[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]if[/B][/COLOR][COLOR=#000000]( [/COLOR][COLOR=#000000]disposing [/COLOR][COLOR=#000000])[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#7f0055][B]if [/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]components != [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000]) [/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]                    [/COLOR][COLOR=#000000]components.Dispose[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]base.Dispose[/COLOR][COLOR=#000000]( [/COLOR][COLOR=#000000]disposing [/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]#region Windows Form Designer generated code[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// <summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// Required method for Designer support - do not modify[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// the contents of this method with the code editor.[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// </summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]InitializeComponent[/COLOR][COLOR=#000000]()[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.Label[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.GroupBox[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.CheckBox[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.RadioButton[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2 = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.Label[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.SuspendLayout[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].SuspendLayout[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// label1[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]8[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]16[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.Name = [/COLOR][COLOR=#2a00ff]"label1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]200[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]240[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.TabIndex = [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.Text = [/COLOR][COLOR=#2a00ff]"label1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// groupBox1[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.Controls.AddRange[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.Control[/COLOR][COLOR=#000000][] {[/COLOR]
    [COLOR=#ffffff]                                                                                    [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1,[/COLOR]
    [COLOR=#ffffff]                                                                                    [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1,[/COLOR]
    [COLOR=#ffffff]                                                                                    [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2,[/COLOR]
    [COLOR=#ffffff]                                                                                    [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3,[/COLOR]
    [COLOR=#ffffff]                                                                                    [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4[/COLOR][COLOR=#000000]})[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]232[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]48[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.Name = [/COLOR][COLOR=#2a00ff]"groupBox1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]72[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]128[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.TabIndex = [/COLOR][COLOR=#990000]1[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.TabStop = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.Text = [/COLOR][COLOR=#2a00ff]"groupBox1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// checkBox1[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]8[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]32[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.Name = [/COLOR][COLOR=#2a00ff]"checkBox1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]56[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]24[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.TabIndex = [/COLOR][COLOR=#990000]1[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.Text = [/COLOR][COLOR=#2a00ff]"checkBox1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.CheckedChanged += [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.EventHandler[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1_CheckedChanged[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// radioButton1[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]8[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]64[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Name = [/COLOR][COLOR=#2a00ff]"radioButton1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]16[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]24[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.TabIndex = [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Text = [/COLOR][COLOR=#2a00ff]"radioButton1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// radioButton2[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]40[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]64[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Name = [/COLOR][COLOR=#2a00ff]"radioButton2"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]16[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]24[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.TabIndex = [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Text = [/COLOR][COLOR=#2a00ff]"radioButton1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// radioButton3[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]8[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]96[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Name = [/COLOR][COLOR=#2a00ff]"radioButton3"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]16[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]24[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.TabIndex = [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Text = [/COLOR][COLOR=#2a00ff]"radioButton1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// radioButton4[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]40[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]96[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Name = [/COLOR][COLOR=#2a00ff]"radioButton4"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]16[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]24[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.TabIndex = [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Text = [/COLOR][COLOR=#2a00ff]"radioButton1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// label2[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2.Location = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Point[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]328[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]16[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2.Name = [/COLOR][COLOR=#2a00ff]"label2"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2.Size = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]200[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]240[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2.TabIndex = [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2.Text = [/COLOR][COLOR=#2a00ff]"label1"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// ImageZoom[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#3f7f5f]// [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].AutoScaleBaseSize = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]5[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]13[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].ClientSize = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Drawing.Size[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]536[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]266[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].Controls.AddRange[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]System.Windows.Forms.Control[/COLOR][COLOR=#000000][] {[/COLOR]
    [COLOR=#ffffff]                                                                          [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1,[/COLOR]
    [COLOR=#ffffff]                                                                          [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1,[/COLOR]
    [COLOR=#ffffff]                                                                          [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2[/COLOR][COLOR=#000000]})[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].Name = [/COLOR][COLOR=#2a00ff]"ImageZoom"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].Text = [/COLOR][COLOR=#2a00ff]"ImageZoom"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].groupBox1.ResumeLayout[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].ResumeLayout[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]#endregion[/COLOR]
    
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// <summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// The main entry point for the application.[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#3f7f5f]/// </summary>[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000][[/COLOR][COLOR=#000000]STAThread[/COLOR][COLOR=#000000]][/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]static [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]Main[/COLOR][COLOR=#000000]() [/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]Application.Run[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]ImageZoom1[/COLOR][COLOR=#000000]())[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]protected [/B][/COLOR][COLOR=#000000]override [/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]OnPaint[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]PaintEventArgs e[/COLOR][COLOR=#000000])[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{   [/COLOR][COLOR=#000000]ImageZoom[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];    [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]checkBox1_CheckedChanged[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]object sender, System.EventArgs e[/COLOR][COLOR=#000000])[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{   [/COLOR][COLOR=#000000]ImageZoom[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];    [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]private [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]radioButtons_CheckedChanged[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]object sender, System.EventArgs e[/COLOR][COLOR=#000000])[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{   [/COLOR][COLOR=#000000]ImageZoom[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];    [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]protected [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]ImageZoom[/COLOR][COLOR=#000000]()[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]Graphics g1 = Graphics.FromHwnd[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label1.Handle[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]Graphics g2 = Graphics.FromHwnd[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].label2.Handle[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]Rectangle rec;[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]Rectangle recPart;[/COLOR]
    
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]if [/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].checkBox1.Checked[/COLOR][COLOR=#000000]) [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#7f0055][B]if [/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]im == [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000]) [/COLOR][COLOR=#000000]ReadImage[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]         [/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]rec = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]Rectangle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000], label1.Width, label1.Height[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]g1.DrawImage[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]im, rec[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#3f7f5f]// Center part:[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]recPart = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]Rectangle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]im.Width/[/COLOR][COLOR=#990000]4[/COLOR][COLOR=#000000], im.Height/[/COLOR][COLOR=#990000]4[/COLOR][COLOR=#000000], im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000],[/COLOR]
    [COLOR=#ffffff]                    [/COLOR][COLOR=#000000]im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#7f0055][B]if[/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Checked[/COLOR][COLOR=#000000])  [/COLOR][COLOR=#3f7f5f]// Left-Top part[/COLOR]
    [COLOR=#ffffff]                    [/COLOR][COLOR=#000000]recPart = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]Rectangle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000], im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#7f0055][B]if[/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Checked[/COLOR][COLOR=#000000])  [/COLOR][COLOR=#3f7f5f]// Right-Top part[/COLOR]
    [COLOR=#ffffff]                    [/COLOR][COLOR=#000000]recPart = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]Rectangle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], [/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000], im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#7f0055][B]if[/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Checked[/COLOR][COLOR=#000000])  [/COLOR][COLOR=#3f7f5f]// Left-Down part[/COLOR]
    [COLOR=#ffffff]                    [/COLOR][COLOR=#000000]recPart = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]Rectangle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#990000]0[/COLOR][COLOR=#000000], im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#7f0055][B]if[/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Checked[/COLOR][COLOR=#000000])  [/COLOR][COLOR=#3f7f5f]// Right-Down part[/COLOR]
    [COLOR=#ffffff]                    [/COLOR][COLOR=#000000]recPart = [/COLOR][COLOR=#7f0055][B]new [/B][/COLOR][COLOR=#000000]Rectangle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000], im.Width/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000],[/COLOR]
    [COLOR=#ffffff]                        [/COLOR][COLOR=#000000]im.Height/[/COLOR][COLOR=#990000]2[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]g2.DrawImage[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]im, rec, recPart, GraphicsUnit.Pixel[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]else [/B][/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]Clear[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]g1[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]                [/COLOR][COLOR=#000000]Clear[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]g2[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]}[/COLOR]
    
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]g1.Dispose[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];   g2.Dispose[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];      [/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]protected [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]ReadImage[/COLOR][COLOR=#000000]()[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]string path = @[/COLOR][COLOR=#2a00ff]"szeret3.BMP"[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]im = Image.FromFile[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]path[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Enabled = [/COLOR][COLOR=#7f0055][B]true[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Enabled = [/COLOR][COLOR=#7f0055][B]true[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Enabled = [/COLOR][COLOR=#7f0055][B]true[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Enabled = [/COLOR][COLOR=#7f0055][B]true[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#7f0055][B]protected [/B][/COLOR][COLOR=#7f0055][B]void [/B][/COLOR][COLOR=#000000]Clear[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000]Graphics g[/COLOR][COLOR=#000000])[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]{[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]g.Clear[/COLOR][COLOR=#000000]([/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].BackColor[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]g.Dispose[/COLOR][COLOR=#000000]()[/COLOR][COLOR=#000000];        [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]im = [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#000000]im2 = [/COLOR][COLOR=#7f0055][B]null[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Checked = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Checked = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Checked = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Checked = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton1.Enabled = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton2.Enabled = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton3.Enabled = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]            [/COLOR][COLOR=#7f0055][B]this[/B][/COLOR][COLOR=#000000].radioButton4.Enabled = [/COLOR][COLOR=#7f0055][B]false[/B][/COLOR][COLOR=#000000];[/COLOR]
    [COLOR=#ffffff]        [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#ffffff]    [/COLOR][COLOR=#000000]}[/COLOR]
    [COLOR=#000000]}[/COLOR]
    
    [COLOR=#ffffff]           [/COLOR]
    [COLOR=#ffffff]       
    [/COLOR][/B]
     
  3. Nody

    Nody Power Member

    not really....essas buscas ja eu as fiz...

    tks anyway
     
  4. Tens a sorteza? :004:
     
  5. Nody

    Nody Power Member

    Tou farto de olhar para isso e não se faz luz....

    eu tenho uma toolstrip menu com o zoom a 25%,50%.... e quero que a bmp seja modificada com esse zoom...
    o algoritmo desse código não se aplica aqui......penso...
     

Partilhar esta Página