From 5fd3c9e7c3abf849398d0887d59e79271d4997ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Gallostra=20Ac=C3=ADn?= Date: Sat, 27 May 2017 18:27:42 +0200 Subject: [PATCH] Add files via upload --- Form1.Designer.cs | 66 +++++++-- Form1.cs | 25 +++- Form1.resx | 360 ++++++++++++++++++++++++++++++++++++++++++++++ HelperMethods.cs | 62 +++++--- History.txt | 39 +++++ Initialize.cs | 12 +- 6 files changed, 517 insertions(+), 47 deletions(-) create mode 100644 History.txt diff --git a/Form1.Designer.cs b/Form1.Designer.cs index f958016..ac14d5f 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -34,7 +34,6 @@ private void InitializeComponent() this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.label2 = new System.Windows.Forms.Label(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); @@ -44,12 +43,17 @@ private void InitializeComponent() this.IsBlackAndWhite = new System.Windows.Forms.RadioButton(); this.IsColor = new System.Windows.Forms.RadioButton(); this.pictureBox5 = new System.Windows.Forms.PictureBox(); + this.PixelsToCharacterWidth = new System.Windows.Forms.TextBox(); + this.pictureBox6 = new System.Windows.Forms.PictureBox(); + this.label1 = new System.Windows.Forms.Label(); + this.PixelsToCharacterHeight = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit(); this.SuspendLayout(); // // openFileDialog1 @@ -121,17 +125,6 @@ private void InitializeComponent() this.button3.UseVisualStyleBackColor = false; this.button3.Click += new System.EventHandler(this.button3_Click); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label1.Location = new System.Drawing.Point(37, 10); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(163, 25); - this.label1.TabIndex = 4; - this.label1.Text = "Loaded Image"; - // // pictureBox2 // this.pictureBox2.Location = new System.Drawing.Point(333, 41); @@ -214,12 +207,52 @@ private void InitializeComponent() this.pictureBox5.TabIndex = 16; this.pictureBox5.TabStop = false; // + // PixelsToCharacterWidth + // + this.PixelsToCharacterWidth.Font = new System.Drawing.Font("Verdana", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.PixelsToCharacterWidth.Location = new System.Drawing.Point(234, 331); + this.PixelsToCharacterWidth.Name = "PixelsToCharacterWidth"; + this.PixelsToCharacterWidth.Size = new System.Drawing.Size(58, 37); + this.PixelsToCharacterWidth.TabIndex = 20; + // + // pictureBox6 + // + this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image"))); + this.pictureBox6.Location = new System.Drawing.Point(226, 357); + this.pictureBox6.Name = "pictureBox6"; + this.pictureBox6.Size = new System.Drawing.Size(140, 63); + this.pictureBox6.TabIndex = 21; + this.pictureBox6.TabStop = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; + this.label1.Location = new System.Drawing.Point(36, 10); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(163, 25); + this.label1.TabIndex = 22; + this.label1.Text = "Loaded Image"; + // + // PixelsToCharacterHeight + // + this.PixelsToCharacterHeight.Font = new System.Drawing.Font("Verdana", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.PixelsToCharacterHeight.Location = new System.Drawing.Point(179, 374); + this.PixelsToCharacterHeight.Name = "PixelsToCharacterHeight"; + this.PixelsToCharacterHeight.Size = new System.Drawing.Size(58, 37); + this.PixelsToCharacterHeight.TabIndex = 25; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(112)))), ((int)(((byte)(193)))), ((int)(((byte)(179))))); - this.ClientSize = new System.Drawing.Size(562, 339); + this.ClientSize = new System.Drawing.Size(562, 439); + this.Controls.Add(this.PixelsToCharacterHeight); + this.Controls.Add(this.label1); + this.Controls.Add(this.PixelsToCharacterWidth); + this.Controls.Add(this.pictureBox6); this.Controls.Add(this.pictureBox5); this.Controls.Add(this.IsColor); this.Controls.Add(this.IsBlackAndWhite); @@ -228,7 +261,6 @@ private void InitializeComponent() this.Controls.Add(this.trackBar1); this.Controls.Add(this.label2); this.Controls.Add(this.pictureBox2); - this.Controls.Add(this.label1); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.pictureBox1); @@ -242,6 +274,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -254,7 +287,6 @@ private void InitializeComponent() private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; - private System.Windows.Forms.Label label1; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.Label label2; private System.Windows.Forms.SaveFileDialog saveFileDialog1; @@ -264,6 +296,10 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton IsBlackAndWhite; private System.Windows.Forms.RadioButton IsColor; private System.Windows.Forms.PictureBox pictureBox5; + private System.Windows.Forms.TextBox PixelsToCharacterWidth; + private System.Windows.Forms.PictureBox pictureBox6; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox PixelsToCharacterHeight; } } diff --git a/Form1.cs b/Form1.cs index 7f189f1..017934d 100644 --- a/Form1.cs +++ b/Form1.cs @@ -79,7 +79,26 @@ private void button2_Click_1(object sender, EventArgs e) { Imagen_BW = (Image)HelperMethods.Grayscale(ResizedImage_O); // Get grayscale image } - ResultImage = HelperMethods.Convert2ASCII(Imagen_BW, CharSet,out ResultText); + // Test if there are Width and Height values on the pixel per character textboxes + int? width = null; + int? height = null; + if (PixelsToCharacterWidth.Text != "" & PixelsToCharacterHeight.Text != "") + { + // Convert them to integers + try + { + width = Int32.Parse(PixelsToCharacterWidth.Text); + height = Int32.Parse(PixelsToCharacterHeight.Text); + } + catch (Exception) + { + + throw new System.FormatException("Width and Height values must be integers"); + } + + } + + ResultImage = HelperMethods.Convert2ASCII(Imagen_BW, width, height, CharSet,out ResultText); ImageText = ResultText; if (IsBlackAndWhite.Checked) pictureBox2.Image = HelperMethods.ResizeImage(ResultImage, pictureBox2); @@ -136,8 +155,6 @@ private void openFileDialog1_FileOk(object sender, CancelEventArgs e) ResizedImage_O = null; Imagen_BW = null; ResultImage = null; - - } private void saveFileDialog1_FileOk(object sender, CancelEventArgs e) @@ -146,7 +163,5 @@ private void saveFileDialog1_FileOk(object sender, CancelEventArgs e) } - - } } diff --git a/Form1.resx b/Form1.resx index 47b3088..a6d1c3d 100644 --- a/Form1.resx +++ b/Form1.resx @@ -305,6 +305,366 @@ Xdjza9xDcaeW2DDeAScnhhPGqXgIAAAAAElFTkS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fxs8Fys8Fy + s8Fys8Fys8Fys8Fys8Byt8V5sL1rsb9us8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8FwsMBsq7pi5+3Vrrxnrr1oscBxscJnk5pu6url//////////////////////////////////// + +fXuu4Ic8pwA/6QA/6IA/6IA/6IA/6IA/6IA/6IA/6MA+6IAun8Y9/Lp//////////////////////// + ////////////+fj4m597sL9ls8Fus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwscBurLpkxtCV + /Pz5/v7//f39/f39/f39/f39/v39/v7++fr1v8uJqbdfsb9ts8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8FwssBtp7dbwMyK+Pn0/v79/v39/f39/f39/f39/f39/v3+////9Pbrsb9urLtls8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+zVrr1nrr1oscBxssJnk5tr6Oni//// + ////////////////////////////////9vTutoAj8JkA/6AA/54A/54A/54A/54A/54A/54A/58A+J8A + tn0b8+/n////////////////////////////////////9/f3mZ17r71kssFus8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwsL1so7NU5OjO////////////////////////////////+PrztMFzqbhg + ssFws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8BwrLtkp7he8PLk//////////////////////////////// + 8/bpr79trLtjs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi + 5+3Vrr1nrr1oscBxssJnk5ts6Onj////////////////////////////////////9vTutoAi8JkA/6AA + /6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEAtXwa8+/n////////////////////////////////////9/f3 + l517sL1kssFus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwr75oo7RV6OzV//7+//// + ////////////////////////6+3aqrlhrrxns8Fxs8Fws8Fws8Fws8Fws8Fws8Fwr75qp7hb5OjM//// + /////////////////////////////v7+x9KYp7ZbsL5ss8Fxs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBxssJnk5ts6Onj//////////////////// + ////////////////9vTutoEi8JkA/6AA/6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEAtn0a8+/n//////// + ////////////////////////////9/f3l517sL1kssFus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8FwssBwq7xjrrtm7fDf/////////////////////////////v38y9SdprdZsb9us8Fws8Fw + s8Fws8Fws8FwssBuprdZydKb+Pnz////////////////////////////////5erQpLRUrr1rs8Fys8Fv + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBx + ssJnk5ts6Onj////////////////////////////////////9vTutoEi8JkA/6AA/6EA/6EA/6EA/6EA + /6EA/6EA/6AA+KEAtn0a8+/n////////////////////////////////////9/f3l517sL1kssFus8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwsb9spLRWzdWi/P36//////////////// + ////////////9/jwsL5rq7pissBws8Fvs8Fws8Fws8FwrLtkrbtk8/Tp//////////////////////// + ////////8/Xqq7tlrLxks8Fws8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBxssJnk5ts6Onj//////////////////////////////////// + 9vTutoEi8JkA/6AA/6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEAtn0a8+/n//////////////////////// + ////////////9/f3l517sL1kssFus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssBvssBvssBws8Fws8Fws8Fws8Fws8Fws8Fw + s8FwsL5uoLFQ3OK+////////////////////////////////6u7Zp7dbrbxms8Fxs8Fws8FwsMBspbZZ + 5uvQ////////////////////////////////+fr1ws2PqbpfssBts8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBxssJnk5ts6Onj//// + ////////////////////////////////9vTutoEi8JkA/6AA/6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEA + tX0a8+/n////////////////////////////////////9/f3l517sL1kssFus8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssBwsr9vtMFt + t8RtsL5vsr5vs8Fws8Fws8Fws8BvrrxussBvs8Fwr71oqLhc6e7Y//////////////////////////// + /P37ytSfprdbsL9rs8FwssBwpLVXx9CU+vv2////////////////////////////////1d2zqLhdrr1p + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi + 5+3Vrr1nrr1oscBxssJnkppr6Oni////////////////////////////////////9vTutoAi8JkA/6AA + /6AA/6AA/6AA/6AA/6AA/6AA/58A+KAAtXwb8+/n////////////////////////////////////9/b3 + l517sL1kssFus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8FwssBws8Bvuchxr8N1prx1vc1xtcNusL5vs8Fws8FwssBwqrdrsb9vs8FwssBvqbli + u8aB+vr1////////////////////////////+Pnzwc2NqLhdssBuq7lhssBw9PXp//////////////// + ////////////////4ufKpLRVrbxls8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBxscFnlJts6uzm//////////////////// + ////////////////+fbxvIEf8psA/6IA/6AA/6AA/6AA/6AA/6AA/6AA/6IA+6IAu34X9/Ho//////// + ////////////////////////////+fn5mp99r75lssFus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FvtsNwssVzhZBfeYBak6hvu8t0tcNt + sL5vs8Fws8BwssBws8Fws8Fws8FwsL9tobNR3ePD/v7+////////////////////////////9vjvq7lh + q7piorNS4ufK////////////////////////////////+PnztcJ2qrtjssBvs8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fwr75orLtjq7tjsb9ts8Fws8FwssBurLxlrLtjsL5os8FwsMBsq7pi5+3Vrr1nrr1oscBx + ssFplJ1x19XN5+bk5OTh5OTh5OTh5OTh5OTh5OTh5OTh5ebl4t7YsoEu3pgS5p0X5JwY5JwY5JwY5JwY + 5JwY5JwY5ZwY5J4SsX4n4eDe5ujr5OTk5OTk5OTk5OTk5OTk5OTk5OTk5uXm5OPlmJ18scBns8Fvs8Fw + s8FwssBwsb9vsL5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsb5vsL5v + ssFutcZzbHteg1gUqmgCU0Y4f5Nrvs93tsNusL5vs8Fws8Bws8Fws8Fws8Fws8Fwrr5qpLRU4OXF//// + /////////////////////////v7+0dmpna9JwcyM9vfu////////////////////////////////09uu + prZasb9ts8Fws8Fvs8Fws8Fws8Fws8Fws8Fws8FwsL5qtcJ1ucV9u8eCsL5tsb9tssBusb5susV9usZ/ + tMFzsL5rsb9sq7pi5+3Vrr1nrr1ossBvs8Vvk552vZRTw5RIwJRJwJRJwJRJwJRJwJRJwJRJwJNJwZRK + w5pUm4Nav5A7wpI6wJA7wJE7wJE7wJE7wJE7wJE7wZE8xpIzm3tDw8bOwsTJwMC/wMDAwMDAwMDAwMDA + wMDAwMDAwsHCxcTMlJl5s8Jns8Fvs8FwscBvtMFvusdwu8lxu8lxu8lxu8lxu8lxu8lxu8lxu8lxu8lx + u8lxu8lxu8lxu8lxu8lxu8lxu8lxu8lxv85zvtN6T01C5JwE/7sA7pUAZ00td41qvc52tsNtsL5vs8Fw + s8Fws8Fws8Fws8FwssBwrLtlq7tj7vHg////////////////////////////+vr3u8iA9vjw//////// + ////////////////////////5OnOo7RUrrxns8Fxs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fwp7Zb29+1 + 9vfu+vr2ssJ0rLtmr71rtcBt7vHg9/n01d22rbpjrr1oq7pi5+3Vrr1nrr1oscBvscRylaF565wT/54A + /54A/54A/54A/54A/54A/54A/54A/54A+qABwJE986MJ/6QA/6IA/6IA/6IA/6IA/6IA/6IA/6QA/KUA + v38U+PPp////////////////////////////////////+vr5m6F+r79lssFussBvuMdvssV1n7h1m7Nz + nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN0nLN1oLZ1m7d8RUxJ35MH + /6QA/6wA8JYAYkgudpBrv9F2t8RvsL5vs8Fws8Fws8Fws8Fvs8Fwsr9upLVXxc6T/f38//////////// + ////////////////////////////////////////////////////8/TpsL5srLtjs8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FworRW5efH/////Pz5r71uq7tmrr1qtMBq8vTk////3OTJqrlhrbxmq7pj + 5+3Vrr1nrr1oscBvssRzk6F76J0X/6AA/6AA/6AA/6AA/6AA/6AA/6AA/6AA/6EA9qEHt49E8J8O/6AA + /58A/58A/58A/58A/58A/58A/6AA+KAAtn0a9O/n////////////////////////////////////9/f3 + mJ58r75lssFutMNwscJye4hfdG9KdmxCdGxEdGxDdGxDdG1DdGxDdGxDdGxDdGtDdG1DdGxDdGxDdGxD + dGtDdG1DdGxDdGxEdW1DbmtId18u654F/6AA/50A/6YA5YwBYE42fZdwu852tsRusb9vs8Fws8Fws8Fw + s8FvssFwsL5tobNS3OO+//////////////////////////////////////////////////////////// + /v79x8+Vqrlhsb9ts8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FworVV4ebA/////Pv5rr1tq7pk + rr1os79o8PPj////2eHDqbherbxnq7pj5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA + /6EA/6EA/6EA/58A9qEHto5D8J8O/6AA/6EA/6EA/6EA/6EA/6EA/6EA/58A+KEAtXwa8+/n//////// + ////////////////////////////9/f3l517r71ltMNuu8x0b4BfiFIb1HcA5IkA4IgA4IcA4IgA4IkA + 4IoA4IsA4IoA4IkA4IwA4IsA4IwA4IoA4IkA4IwA4IsA4IoA3osA3YsB+6MA/58A/5sA/5sA/5gA/6QA + 6IsAY0w1c4hlucp1tMJussBws8Fws8Fws8Fws8Fvs8Fwrrxop7hb6ezV/v79//////////////////// + ////////////////////////////////2+K7obNRrLxms8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8FworVV4ea/////+fr3qLhipLRWp7ZarLlc7/Hg////2uDCqbherbxnq7pj5+3Vrr1nrr1oscBv + ssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A9qEHto5D8J8O/6AA/6EA/6EA/6EA/6EA + /6EA/6EA/6AA+KEAtn0a8+/n////////////////////////////////////9/f3l517r75mtsNtvM54 + S1JL6ooE/6QA/58A/50A/54A/6AA/6AA/58A/6AA/6EA/6AA/6IA/6AA/6IA/6EA/6EA/6IA/6EA/6EA + /6IA/6IA/50A/5oA/5oA/5oA/5gA/5cA/58A5ooBa0klk6Vqt8dxsb9vs8Fws8Fws8Fws8Fws8FwssBv + qbpitMF09PXr////////////////////////////////////////////////6e3WqLdarr1os8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FworVV4ObA/v/+/f3809uw0Nip0dur1tys9/nw/v7/ + 2uHCqbherbxnq7pj5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A + 9qEHto5D8J8O/6AA/6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEAtn0a8+/n//////////////////////// + ////////////9/f3l517r75mtcNtvdF5TVBJ6IYF/50A/5cA/ZYA/ZcA/5cA/5cA/5gA/5YA/5cA/5UA + /5cA/5UA/5cA/5YA/5cA/5cA/5cA/5cA/5cA/5cA/5YA/5oA/5kA/5kA/5gA/5UA/5UA+6IAtmIDdoNf + s8Zzs8Bus8Fws8Fws8Fws8Fws8Fws8Fvsb9uo7NTx9GX+fr0//////////////////////////////// + /////////v78ucZ8qrphs8Bvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FworVV4ObA + /v79/////////////////////////f3+2uHCqbherbxnq7pj5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA + /6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A9qEHto5D8J8O/6AA/6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEA + tn0a8+/n////////////////////////////////////9/f3l517r75mtcNtvdF5SU1J7IgE/6QA/58A + /50A/54A/50A/50A/50A/54A/50A/54A/50A/54A/54A/5wA/54A/50A/50A/50A/50A/54A/5oA/5cA + /5UA/5gA/5YA/5QA/5sA5YwAfE4di55otsdyssBus8Fws8Fws8Fws8Fws8Fws8Fws8Fwsb9vm61E6u3X + ////////////////////////////////////+vv419+3prZar79ss8Fws8Fvs8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FworVV4ea//v/+/f381d201dyw1dyy2N6y9/nw/v7/2uDCqbherbxnq7pj + 5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A9qEHto5D8J8O/6AA + /6EA/6EA/6EA/6EA/6EA/6EA/6AA+KEAtXwa8+/n////////////////////////////////////9/f3 + l517r75ltcNuu8x1W2tasmQM44cA4okA4IcA4IcA4IcA4IcA4IcA4IcA4IcA4IcA4IcA4IcA4IcA4IYA + 4IcA4IcA4IYA4IcA34YA34cA/5oA/5gA/5MA/5QA/5IA/5sA5YsAdE8nYHVht8t1tsJussBws8Fws8Fw + s8Fws8Fws8Fws8FwssBwrLtkrrxn7O/b////////////////////////////////////9vjuu8eAprZZ + sb9us8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FworVV4eW/////+fr2obNUnK1G + n69Kp7NO7/He////2uHCqbherbxnq7pj5+3Vrr1nrr1oscBvssRzk6F66JwY/6EA/6AA/6AA/6AA/6AA + /6AA/6AA/6AA/58A9qEHto5E758O/58A/6AA/58A/58A/58A/58A/6AA/58A+KAAtXwb8+/n//////// + ////////////////////////////9/f3l517sL5kssFut8VxobRubmZFhGYyiGo0hGk1hWk1hWk1hWs1 + hWk1hWk1hWs1hWk1hWk1hWk1hWk1hWs1hWk1hWk1hWs1hGk1hWo2gWo6m2oj8pMD/5UA/5EA/5oA5IkA + c08pZ4Rsu9B4uMZusr9us8Fws8Fws8Fws8Fws8Fws8Fws8FwsL5ro7RV3uTC//////////////////// + ////////////////////////+/r4tMJ1q7tissFvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8FworRW5ejJ/////Pz7sL5yrb1psL9ttcFt8vXm////3eXKqrhgrbxmq7pj5+3Vrr1nrr1oscBv + ssRzk6F66aAW/6MA/6EA/6IA/6IA/6IA/6IA/6IA/6EA/6MA+qQFu5JD86QO/6UA/6QA/6QA/6QA/6QA + /6QA/6QA/6UA/KUAu4AZ9/Dn////////////////////////////////////+ff3m599r75mssFus8Bv + vM1zo7t2jqtzjap0jat0jat0jat0jap0jat0jat0jap0jat0jat0jat0jat0jap0jat0jat0jap0jap0 + krB2jLB8OUZN24cI/5QA/5sA6IoAcU0nZIBpxdZ5ucZvsL5us8Fws8Fws8Fws8Fws8Fws8Fws8Fwsb9u + orNQy9Sg+Pnz////////////////////////////////////////////////4+fKpbRXsL5qs8Fxs8Fv + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwpbZZ3OK59Pbr9PfssL5wrLtmr7xrtMBs6+3Y9vjv + 1t66rLpjrb1oq7pi5+3Vrr1nrr1ossBvssRylKF82Zgk55oV4poZ45oZ45oZ45oZ45oZ45oZ45oZ5JoY + 4p0Yr4Ey3YkA5YgA4ogA44gA44gA44gA44gA44gA44gA5IkAr3MQ4fXx5fz/4vb/4/b/4/b/4/b/4/b/ + 4/b/4vb/5Pf/5fj/mKCCscBls8Fus8Fwsb9uuMVxvMlxvMpwvMpwvMpwvMpwvMpwvMpwvMpwvMpwvMpw + vMpwvMpwvMpwvMpwvMpwvMpwvMpwu8lwwM5zv9R6TkxB6IkD/6QA54YAelAiZX1lvdB3tsRusb9us8Fw + s8Fws8Fws8Fws8Fws8Fws8FvssBwqLhduMV9+fr1//////////////////////////////////////// + /////////////f37y9WeorNQr71ps8Fxs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwrr1quMV6 + v8uJw8+Pr75usL5sssBusb9rwMqKwcuLuMR7r71rsL5sq7pi5+3Vrr1nrr1ossBvs8RwlKB815Ml3JQe + 15Ul15Uj15Uj15Uj15Uj15Uj15Uj2ZUi35Ihpp2R2bSE2rl717h817h817h817h817h82Lh82Ll84LZ9 + ppiD3raC27OB17CA17CA17CA17CA17CA17CA17CA2bKA4baBlpp3scNts8FvssBws8Fwsb9vsb5vsb5u + sb5usb5usb5usb5usb5usb5usb5usb5usb5usb5usb5usb5usb5usb5usb5usb5us8ButsdzaHRYkFQT + qmIFakwtbYJlvNF4uMVvsb5us8Fws8Fws8Fws8Fws8Fws8Fws8FwssBwr7xpqrlf7fHg//////////// + /////////////////////////////////////////////////Pz6vsqGqLddscBus8Fws8Fvs8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwssFwrbxnqbphqrpgsL9ts8Fws8Fwsb9tq7tiqrlhrb1ns8BvsMBsq7pi + 5+3Vrr1nrr1oscBvscRzk6B76Z0W/p8A+p8C+p8C+p8C+p8C+p8C+p8C+p8C/Z4A+ZYRt8nm8v3//v// + +v//+v//+v//+v//+v//+v///P//+///tszt94kP/Y8A+pEA+pEA+pEA+pEA+pEA+pEA+pEA/JEA+JAA + mJhtsMVzssBvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8FwssBwtcRwq790eH9XdHFNfpdsus12t8Vusb5us8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8FxsL9rn7BO1tyz/v3+/////////////////////////////vz8//////////////////////////// + ////9PbrtcF0rLljs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssFws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBvssRzk6F66J0Y/6EA/6EA/6EA/6EA/6EA + /6EA/6EA/6EA/58A9pgPt8Tb8Pf/////////////////////////////////+f3/t8bh9JgU/6AA/6IA + /6EA/6EA/6EA/6EA/6EA/6EA/6EA96EGl5xzsMVzssFus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssBws8FvucZvt8p2scd4vs5ytMFtsb9u + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsL9tpbRXzdWi/Pz6////////////////////////////+/z5 + ws6P1N2z+Pr1////////////////////////////5enPpbVYrb1os8Fws8Fvs8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBv + ssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/54A9pcPtsTZ8Pb///////////////////// + ////////////+Pz/tcbh85cV/50A/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA958Gl5tzsMVzssFts8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fwsb9utMFutsNusb9usr9vs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssBvqrpjtMBz9PXr//// + ////////////////////////////6e3XobJQp7le7vLj/////////////////////////////v7+zdei + pbZYsL9us8Fws8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A + 9pcQtsTY8PX/////////////////////////////////+Pv/tsbg85cV/50A/6EA/6EA/6EA/6EA/6EA + /6EA/6EA/6EA958Gl5tzsMVzssFts8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwsb9wsb9us8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8FwsL5qprdZ5OnN/f78/////////////////////////////f39t8N5qrlipbVXvsuJ+Pny + //////////////////////////////7/u8eDqLhesb9us8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA + /6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A9pcQtsTZ8Pb/////////////////////////////////+Pz/ + tsbg85cV/50A/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA958Gl5tzsMVzssFts8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwsb9uo7NT09us/v7+//////////////////////// + ////+vv3ztimpbZXsb9ts8FxobNRzNaj+/z5////////////////////////////7PDdq7lhrLtks8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi + 5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A9pcQtsTZ8Pb///// + ////////////////////////////+Pz/tsbg85cV/50A/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA958G + l5tzsMVzssFts8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8BxqLddu8iC + +/r3//////////////////////////////7+3+TCp7dcr7xos8Fxs8Bwr79qqbde7e/d//////////// + //////////////////7/1t2zpLNVr71ps8Fxs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBvssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA + /6EA/6EA/6EA/58A9pcQtsTY8Pb/////////////////////////////////+Pz/tsbg85cV/50A/6EA + /6EA/6EA/6EA/6EA/6EA/6EA/6EA958Gl5tzsMVzssFts8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fwrr5qqbhd6OzV/////////////////////////////////Pz5sr9tq7pissBv + s8Fvs8Fvs8BwqbhgucV9+/v2////////////////////////////+/v40tiqpbVXsL9ss8Fws8Fvs8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7pi5+3Vrr1nrr1oscBv + ssRzk6F76JwY/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A9pcPtsTZ8PX///////////////////// + ////////////+Pv/tcbg85cV/50A/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA958Gl5tzsMVzssFts8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FxsL9rnK5H1Nuw/f38//////////////// + /////////////v7+xdGWprdYsL5ss8Fws8Fws8Fws8Fwsb9uo7RUytOc+vr1//////////////////// + /////////P37ucV8qrphs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8FwsMBsq7pi5+zUrr1nrr1oscBvssRzk6F76J0Y/6EA/6EA/6EA/6EA/6EA/6EA/6EA/6EA/58A + 9pcPt8PZ8Pb/////////////////////////////////+fz/tsXg9JcV/50A/6EA/6EA/6EA/6EA/6EA + /6EA/6EA/6EA+KAGl5tzsMVzssFss8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssBu + pLRV0dmp+/v4/////////////////////////////v7+2+C8prdYr75rs8Fxs8Fws8Fws8Fws8Fws8Fw + sL9rprdb2+K8/f38////////////////////////////7PDdp7ddrrxns8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwsMBsq7li7fDfrrxorr1oscBvscRykp166p0U/6AA + /6AA/6AA/6AA/6AA/6AA/6AA/6AA/54A+pkPwcvk9Pr/////////////////////////////////+/// + wc7p+JgV/5wA/6AA/6AA/6AA/6AA/6AA/6AA/6AA/6AA+p8CmZdvsMV0ssBus8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwssFwqrpfuMR9+fn1////////////////////////////////+vr2sL1r + q7pjs8Fws8Fws8Fws8Fws8Fws8Fws8FvssBxq7tkqLhe9Pbp//////////////////////////////// + 4OXEoLBLrLtms8Fxs8Fvs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwsr9trLtl + 3+TEr75qr75qscBws8Nvm6Z2sZhSuZhKuJhMuJhMuJhMuJhMuJhMuJhMuJhMuJdKtpVOn6mls7ytuLyp + uLupuLupuLupuLupuLupuLupuLupt72sn6qntZVRuZdJt5hMuJhMuJhMuJhMuJhMuJhMuJhMuJhLtpdM + mZ9zssRwssBus8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssFvr75qrr5p5urR//////////// + ////////////////////////y9Whp7dbsL5ts8Fws8Fws8Fws8Fws8Fws8Fws8Fws8FwssBtpLVWxM+S + +/z5////////////////////////////////09ysrb1qr79rs8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwssBvsL5st8V6sb5sssBussBws8Btr71wobV6n7Z9n7Z9n7Z9n7Z9n7Z9 + n7Z9n7Z9n7Z9n7Z8oLZ5pLNmoK5gn6tgn6pgn6tgn6tgn6tgn6tgn6tgn6pgn65gpLNmoLZ4n7d9n7Z9 + n7Z9n7Z9n7Z9n7Z9n7Z9n7Z9n7Z9oLV8rLtxssFts8Bws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8FwssFvsMBtsL9twMuJvsuIv8mGv8mGv8mGv8mGv8mGv8mGvsqGvsmFqLhfsL9rs8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8FwssBwqLhbvMiBvsqHv8mGv8mGv8mGv8mGv8mGv8mGv8qJxdCUsb9tscBs + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Bwrr1nssBvs8Fws8Fw + ssBwssFvtMRttcRttcRttcRttcRttcRttcRttcRttcRttcRttMVutsVutMRttcRttcRttcRttcRttcRt + tcRttcRttcRttMNttsVutMVutcRttcRttcRttcRttcRttcRttcRttcRttcRttMVts8NtssBws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fwsb9sp7dbpbZYprZZprZZprZZprZZprZZprZZ + pbZZprZasb9ss8Fxs8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8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + s8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fws8Fw + + + + 56 + AAABAAYAEBAAAAEAIABoBAAAZgAAAAAAAAABACAA8xoAAM4EAAAwMAAAAQAgAKglAADBHwAAICAAAAEA diff --git a/HelperMethods.cs b/HelperMethods.cs index 5ab0338..e0f5463 100644 --- a/HelperMethods.cs +++ b/HelperMethods.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -14,8 +14,9 @@ public static class HelperMethods { // Se puede jugar con las resoluciones de imagen para ver cual da mejores resultados? - public static Image Convert2ASCII(Image BW_Image, List characters, out List> ResultText) + public static Image Convert2ASCII(Image BW_Image, int? w, int? h, List characters, out List> ResultText) { + /* * ALGORITHM: * @@ -36,25 +37,48 @@ public static Image Convert2ASCII(Image BW_Image, List characters, * 10- Add row text string to text holding string * 11 - return resulting Image & Text */ - Image ResultImage = new Bitmap(BW_Image.Width * characters[0].CharacterImage.Width, BW_Image.Height * characters[0].CharacterImage.Height); + + if (w == null & h == null) + { + w = 1; + h = 1; + } + int width = (int)w; + int height = (int)h; + + // Be careful when Image.Width/widh or Image.Height/height are not integer values (coherent approximations) + Image ResultImage = new Bitmap(BW_Image.Width * characters[0].CharacterImage.Width/width, BW_Image.Height * characters[0].CharacterImage.Height/height); Graphics drawing = Graphics.FromImage(ResultImage); drawing.Clear(Color.White); ResultText = new List> { }; Bitmap BlackAndWhite = (Bitmap)BW_Image; - for (int j = 0; j < BW_Image.Height; j++) // ROW + for (int j = 0; j < BW_Image.Height; j+=height) // ROW { List RowText = new List { }; - for (int i=0; i Math.Abs(t.Weight-targetvalue)==characters.Min(e => Math.Abs(e.Weight - targetvalue))).FirstOrDefault(); RowText.Add(closestchar.Character); - drawing.DrawImage(closestchar.CharacterImage, i * closestchar.CharacterImage.Width, j * closestchar.CharacterImage.Height); + drawing.DrawImage(closestchar.CharacterImage, (i/width) * closestchar.CharacterImage.Width, (j/height) * closestchar.CharacterImage.Height); } ResultText.Add(RowText); } @@ -138,9 +162,7 @@ public static Bitmap Grayscale(Image image) { for (int j = 0; j < btm.Height; j++) { - // Visit https://en.wikipedia.org/wiki/Grayscale for 0.3, 0.59 & 0.11 values - Color pixel = btm.GetPixel(i, j); - int ser = (int)(pixel.R*0.3 + pixel.G*0.59 + pixel.B*0.11); + int ser = (int)(btm.GetPixel(i, j).R*0.3 + btm.GetPixel(i, j).G*0.59 + btm.GetPixel(i, j).B*0.11); btm.SetPixel(i, j, Color.FromArgb(ser, ser, ser)); } } @@ -150,7 +172,7 @@ public static Bitmap Grayscale(Image image) public unsafe static void AdjustContrast(Bitmap bmp, double contrast) { { - byte[] contrast_lookup = new byte[256]; + byte[] contrast_lookup_table = new byte[256]; double newValue = 0; double c = (100.0 + contrast) / 100.0; @@ -169,7 +191,7 @@ public unsafe static void AdjustContrast(Bitmap bmp, double contrast) newValue = 0; if (newValue > 255) newValue = 255; - contrast_lookup[i] = (byte)newValue; + contrast_lookup_table[i] = (byte)newValue; } var bitmapdata = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), @@ -182,9 +204,9 @@ public unsafe static void AdjustContrast(Bitmap bmp, double contrast) byte* destPixels = (byte*)bitmapdata.Scan0 + (y * bitmapdata.Stride); for (int x = 0; x < bitmapdata.Width; x++) { - destPixels[x * PixelSize] = contrast_lookup[destPixels[x * PixelSize]]; // B - destPixels[x * PixelSize + 1] = contrast_lookup[destPixels[x * PixelSize + 1]]; // G - destPixels[x * PixelSize + 2] = contrast_lookup[destPixels[x * PixelSize + 2]]; // R + destPixels[x * PixelSize] = contrast_lookup_table[destPixels[x * PixelSize]]; // B + destPixels[x * PixelSize + 1] = contrast_lookup_table[destPixels[x * PixelSize + 1]]; // G + destPixels[x * PixelSize + 2] = contrast_lookup_table[destPixels[x * PixelSize + 2]]; // R //destPixels[x * PixelSize + 3] = contrast_lookup[destPixels[x * PixelSize + 3]]; //A } } @@ -220,8 +242,8 @@ public static Image DrawText(string text, Color textColor, Color backColor, Size // Create a brush for the text Brush textBrush = new SolidBrush(textColor); - - drawing.DrawString(text, System.Drawing.SystemFonts.DefaultFont, textBrush, (WidthAndHeight.Width - textSize.Width) / 2, 0); // El punto de inserción del carácter se puede afinar más (Trial & Error) + // El punto de inserción del carácter se puede afinar más (Trial & Error) + drawing.DrawString(text, System.Drawing.SystemFonts.DefaultFont, textBrush, (WidthAndHeight.Width - textSize.Width) / 2, 0); drawing.Save(); textBrush.Dispose(); diff --git a/History.txt b/History.txt new file mode 100644 index 0000000..2760c9d --- /dev/null +++ b/History.txt @@ -0,0 +1,39 @@ +-----LOG----- +Modificaciones pendientes y cosas a implementar + +09/03/2016: +(SOLVED) - Modificar la manera de calcular los pesos de cada caracter +(SOLVED) - Pensar como convertimos de Bitmap -> ASCII : + - Metodo: + - Pixel a pixel? + - Agrupación de pixeles ? + - Pixel a pixel sobre la imagen escalada ? +(SOLVED) - Habría que solucionar los problemas con el escalado +(SOLVED) - Renderizado de la imagen una vez tenemos los carácteres que van a formar la imagen +(SOLVED) - Método para guardar la imagen una vez convertida a ASCII + +17/03/2016: + - V.1.0.0 Released + +04/04/2016: + -Hoja de ruta: + - Comentar y documentar código + - Optimizar métodos que tratan con imágenes + - ¿Perfil Github? + - Renombrar variables y métodos + - Funcionalidades adicionales: + - Permitir copiar texto a portapapeles / Guardar en un .txt + - Permitir definir las dimensiones y resolución de salida + - Permitir que la conversión de la imagen sea a color + +12/04/2016: +(DONE) - Rediseño UI +(DONE) - Implementación conversión a color +(DONE) - Corrección de errores: + - Cuando cargabas una imagen nueva y habías + cambiado el contraste de la anterior no + convertía la imagen nueva si no que seguía con la antigua + - Trackbar vuelve a 0 cuando abres una imagen nueva + - TODOs: + - Aumentar la densidad de carácteres cuando la conversión es + a color. diff --git a/Initialize.cs b/Initialize.cs index f09fa4c..ed7b44b 100644 --- a/Initialize.cs +++ b/Initialize.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -78,8 +78,7 @@ private static SizeF GetGeneralSize() // Make sure generalsize is made of integers generalsize.Width = ((int)generalsize.Width); generalsize.Height = ((int)generalsize.Height); - // and size defines a square to maintain image proportions - // as the ASCII transformation will be 1 pixel = 1 character Image + // and that size defines a square to maintain image proportions // thus substituting one pixel by one character image if (generalsize.Width > generalsize.Height) generalsize.Height = generalsize.Width; @@ -101,10 +100,9 @@ private static double GetWeight(char c, SizeF size) { for (int j = 0; j < btm.Height; j++) { - Color pixel = btm.GetPixel(i, j); - totalsum = totalsum + (pixel.R - + pixel.G - + pixel.B)/3; + totalsum = totalsum + (btm.GetPixel(i, j).R + + btm.GetPixel(i, j).G + + btm.GetPixel(i, j).B)/3; } } // Weight = (sum of (R+G+B)/3 for all pixels in image) / Area. (Where Area = Width*Height )