From 71629fe64064b57656f17716034c2697e04355f4 Mon Sep 17 00:00:00 2001 From: Ryhon Date: Mon, 24 Dec 2018 13:52:12 +0100 Subject: [PATCH] Other changes Inluding fixing a typo, thanks u/Zapk --- src/ImageSplitter.Winfroms/Form1.Designer.cs | 771 ++++++++++-------- src/ImageSplitter.Winfroms/Form1.resx | 378 ++++----- .../ImageSplitter.Winforms.csproj | 271 +++--- .../Properties/app.manifest | 68 +- src/ImageSplitter/ImageSplitter.csproj | 158 ++-- src/ImageSplitter/Program.cs | 27 +- src/ImageSplitter/Splitter.cs | 8 +- 7 files changed, 876 insertions(+), 805 deletions(-) diff --git a/src/ImageSplitter.Winfroms/Form1.Designer.cs b/src/ImageSplitter.Winfroms/Form1.Designer.cs index 319ea6b..fadb037 100644 --- a/src/ImageSplitter.Winfroms/Form1.Designer.cs +++ b/src/ImageSplitter.Winfroms/Form1.Designer.cs @@ -28,356 +28,409 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - this.file = new System.Windows.Forms.TextBox(); - this.path = new System.Windows.Forms.TextBox(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.gen = new System.Windows.Forms.Button(); - this.preview = new System.Windows.Forms.PictureBox(); - this.ssize = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.rows = new System.Windows.Forms.TextBox(); - this.columns = new System.Windows.Forms.TextBox(); - this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); - this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.label8 = new System.Windows.Forms.Label(); - this.dimensions = new System.Windows.Forms.Label(); - this.animated = new System.Windows.Forms.Label(); - this.total = new System.Windows.Forms.Label(); - this.genprev = new System.Windows.Forms.Button(); - this.prefix = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.surfix = new System.Windows.Forms.TextBox(); - this.emotename = new System.Windows.Forms.Label(); - this.downscale = new System.Windows.Forms.CheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.preview)).BeginInit(); - this.SuspendLayout(); - // - // file - // - this.file.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.file.Location = new System.Drawing.Point(103, 12); - this.file.Name = "file"; - this.file.Size = new System.Drawing.Size(603, 20); - this.file.TabIndex = 0; - this.file.Tag = ""; - this.file.TextChanged += new System.EventHandler(this.file_TextChanged); - // - // path - // - this.path.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.path.Location = new System.Drawing.Point(103, 38); - this.path.Name = "path"; - this.path.Size = new System.Drawing.Size(603, 20); - this.path.TabIndex = 1; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.button1.Location = new System.Drawing.Point(712, 10); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(59, 23); - this.button1.TabIndex = 4; - this.button1.Text = "Explorer"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.button2.Location = new System.Drawing.Point(712, 36); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(59, 23); - this.button2.TabIndex = 5; - this.button2.Text = "Explorer"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // gen - // - this.gen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.gen.Enabled = false; - this.gen.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.gen.Location = new System.Drawing.Point(490, 349); - this.gen.Name = "gen"; - this.gen.Size = new System.Drawing.Size(281, 99); - this.gen.TabIndex = 6; - this.gen.Text = "Generate!"; - this.gen.UseVisualStyleBackColor = true; - this.gen.Click += new System.EventHandler(this.button3_Click); - // - // preview - // - this.preview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.preview.BackColor = System.Drawing.Color.Transparent; - this.preview.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.preview.Image = ((System.Drawing.Image)(resources.GetObject("preview.Image"))); - this.preview.Location = new System.Drawing.Point(12, 64); - this.preview.Margin = new System.Windows.Forms.Padding(0); - this.preview.Name = "preview"; - this.preview.Size = new System.Drawing.Size(470, 413); - this.preview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.preview.TabIndex = 7; - this.preview.TabStop = false; - // - // ssize - // - this.ssize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ssize.Location = new System.Drawing.Point(562, 156); - this.ssize.Name = "ssize"; - this.ssize.Size = new System.Drawing.Size(100, 20); - this.ssize.TabIndex = 8; - this.ssize.TextChanged += new System.EventHandler(this.ssize_TextChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(73, 13); - this.label1.TabIndex = 12; - this.label1.Text = "Path to Image"; - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(492, 159); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(64, 13); - this.label2.TabIndex = 13; - this.label2.Text = "Square Size"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(12, 41); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(83, 13); - this.label3.TabIndex = 14; - this.label3.Text = "Output Location"; - // - // label4 - // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(485, 127); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(161, 26); - this.label4.TabIndex = 15; - this.label4.Text = "Emote Settings"; - // - // label6 - // - this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(522, 211); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(34, 13); - this.label6.TabIndex = 20; - this.label6.Text = "Rows"; - // - // label7 - // - this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(507, 185); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(47, 13); - this.label7.TabIndex = 19; - this.label7.Text = "Columns"; - // - // rows - // - this.rows.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.rows.Enabled = false; - this.rows.Location = new System.Drawing.Point(562, 208); - this.rows.Name = "rows"; - this.rows.ReadOnly = true; - this.rows.Size = new System.Drawing.Size(100, 20); - this.rows.TabIndex = 18; - // - // columns - // - this.columns.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.columns.Enabled = false; - this.columns.Location = new System.Drawing.Point(562, 182); - this.columns.Name = "columns"; - this.columns.ReadOnly = true; - this.columns.Size = new System.Drawing.Size(100, 20); - this.columns.TabIndex = 17; - // - // openFileDialog1 - // - this.openFileDialog1.FileName = ""; - // - // label8 - // - this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.Location = new System.Drawing.Point(482, 64); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(115, 26); - this.label8.TabIndex = 21; - this.label8.Text = "Image Info"; - // - // dimensions - // - this.dimensions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.dimensions.AutoSize = true; - this.dimensions.Location = new System.Drawing.Point(484, 90); - this.dimensions.Name = "dimensions"; - this.dimensions.Size = new System.Drawing.Size(64, 13); - this.dimensions.TabIndex = 22; - this.dimensions.Text = "Dimensions:"; - // - // animated - // - this.animated.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.animated.AutoSize = true; - this.animated.Location = new System.Drawing.Point(484, 103); - this.animated.Name = "animated"; - this.animated.Size = new System.Drawing.Size(65, 13); - this.animated.TabIndex = 23; - this.animated.Text = "Is Animated:"; - // - // total - // - this.total.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.total.AutoSize = true; - this.total.Location = new System.Drawing.Point(560, 231); - this.total.Name = "total"; - this.total.Size = new System.Drawing.Size(37, 13); - this.total.TabIndex = 25; - this.total.Text = "Total :"; - // - // genprev - // - this.genprev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.genprev.Enabled = false; - this.genprev.Location = new System.Drawing.Point(490, 320); - this.genprev.Name = "genprev"; - this.genprev.Size = new System.Drawing.Size(281, 23); - this.genprev.TabIndex = 26; - this.genprev.Text = "Generate Preview"; - this.genprev.UseVisualStyleBackColor = true; - this.genprev.Click += new System.EventHandler(this.button4_Click); - // - // prefix - // - this.prefix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.prefix.Location = new System.Drawing.Point(562, 247); - this.prefix.Name = "prefix"; - this.prefix.Size = new System.Drawing.Size(100, 20); - this.prefix.TabIndex = 27; - this.prefix.TextChanged += new System.EventHandler(this.prefix_surfix_TextChanged); - // - // label9 - // - this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(523, 250); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(33, 13); - this.label9.TabIndex = 28; - this.label9.Text = "Prefix"; - // - // label10 - // - this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(523, 276); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(33, 13); - this.label10.TabIndex = 30; - this.label10.Text = "Surfix"; - // - // surfix - // - this.surfix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.surfix.Location = new System.Drawing.Point(562, 273); - this.surfix.Name = "surfix"; - this.surfix.Size = new System.Drawing.Size(100, 20); - this.surfix.TabIndex = 29; - this.surfix.TextChanged += new System.EventHandler(this.prefix_surfix_TextChanged); - // - // emotename - // - this.emotename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.emotename.AutoSize = true; - this.emotename.Location = new System.Drawing.Point(487, 296); - this.emotename.Name = "emotename"; - this.emotename.Size = new System.Drawing.Size(128, 13); - this.emotename.TabIndex = 31; - this.emotename.Text = "Example emote name: XX"; - // - // downscale - // - this.downscale.AutoSize = true; - this.downscale.Checked = true; - this.downscale.CheckState = System.Windows.Forms.CheckState.Checked; - this.downscale.Location = new System.Drawing.Point(490, 454); - this.downscale.Name = "downscale"; - this.downscale.Size = new System.Drawing.Size(159, 17); - this.downscale.TabIndex = 32; - this.downscale.Text = "Downscale images to 128px"; - this.downscale.UseVisualStyleBackColor = true; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; - this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(781, 483); - this.Controls.Add(this.downscale); - this.Controls.Add(this.emotename); - this.Controls.Add(this.label10); - this.Controls.Add(this.surfix); - this.Controls.Add(this.label9); - this.Controls.Add(this.prefix); - this.Controls.Add(this.genprev); - this.Controls.Add(this.total); - this.Controls.Add(this.animated); - this.Controls.Add(this.dimensions); - this.Controls.Add(this.label8); - this.Controls.Add(this.label6); - this.Controls.Add(this.label7); - this.Controls.Add(this.rows); - this.Controls.Add(this.columns); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.ssize); - this.Controls.Add(this.preview); - this.Controls.Add(this.gen); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Controls.Add(this.path); - this.Controls.Add(this.file); - this.Name = "Form1"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Image Splitter"; - ((System.ComponentModel.ISupportInitialize)(this.preview)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + this.file = new System.Windows.Forms.TextBox(); + this.path = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.gen = new System.Windows.Forms.Button(); + this.preview = new System.Windows.Forms.PictureBox(); + this.ssize = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.rows = new System.Windows.Forms.TextBox(); + this.columns = new System.Windows.Forms.TextBox(); + this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.label8 = new System.Windows.Forms.Label(); + this.dimensions = new System.Windows.Forms.Label(); + this.animated = new System.Windows.Forms.Label(); + this.total = new System.Windows.Forms.Label(); + this.genprev = new System.Windows.Forms.Button(); + this.prefix = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.suffix = new System.Windows.Forms.TextBox(); + this.emotename = new System.Windows.Forms.Label(); + this.downscale = new System.Windows.Forms.CheckBox(); + this.gif = new System.Windows.Forms.CheckBox(); + this.label5 = new System.Windows.Forms.Label(); + this.delay = new System.Windows.Forms.TextBox(); + this.savprev = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.preview)).BeginInit(); + this.SuspendLayout(); + // + // file + // + this.file.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.file.Location = new System.Drawing.Point(103, 12); + this.file.Name = "file"; + this.file.Size = new System.Drawing.Size(538, 20); + this.file.TabIndex = 0; + this.file.Tag = ""; + this.file.TextChanged += new System.EventHandler(this.file_TextChanged); + // + // path + // + this.path.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.path.Location = new System.Drawing.Point(103, 38); + this.path.Name = "path"; + this.path.Size = new System.Drawing.Size(538, 20); + this.path.TabIndex = 1; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(647, 10); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(59, 23); + this.button1.TabIndex = 4; + this.button1.Text = "Explorer"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.button2.Location = new System.Drawing.Point(647, 36); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(59, 23); + this.button2.TabIndex = 5; + this.button2.Text = "Explorer"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // gen + // + this.gen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.gen.Enabled = false; + this.gen.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.gen.Location = new System.Drawing.Point(424, 415); + this.gen.Name = "gen"; + this.gen.Size = new System.Drawing.Size(282, 99); + this.gen.TabIndex = 6; + this.gen.Text = "Generate!"; + this.gen.UseVisualStyleBackColor = true; + this.gen.Click += new System.EventHandler(this.button3_Click); + // + // preview + // + this.preview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.preview.BackColor = System.Drawing.Color.Transparent; + this.preview.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.preview.Image = ((System.Drawing.Image)(resources.GetObject("preview.Image"))); + this.preview.Location = new System.Drawing.Point(12, 64); + this.preview.Margin = new System.Windows.Forms.Padding(0); + this.preview.Name = "preview"; + this.preview.Size = new System.Drawing.Size(407, 450); + this.preview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.preview.TabIndex = 7; + this.preview.TabStop = false; + // + // ssize + // + this.ssize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.ssize.Location = new System.Drawing.Point(496, 157); + this.ssize.Name = "ssize"; + this.ssize.Size = new System.Drawing.Size(100, 20); + this.ssize.TabIndex = 8; + this.ssize.TextChanged += new System.EventHandler(this.ssize_TextChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 12); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(73, 13); + this.label1.TabIndex = 12; + this.label1.Text = "Path to Image"; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(426, 160); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(64, 13); + this.label2.TabIndex = 13; + this.label2.Text = "Square Size"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(12, 41); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(83, 13); + this.label3.TabIndex = 14; + this.label3.Text = "Output Location"; + // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(419, 128); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(161, 26); + this.label4.TabIndex = 15; + this.label4.Text = "Emote Settings"; + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(456, 212); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(34, 13); + this.label6.TabIndex = 20; + this.label6.Text = "Rows"; + // + // label7 + // + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(441, 186); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(47, 13); + this.label7.TabIndex = 19; + this.label7.Text = "Columns"; + // + // rows + // + this.rows.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.rows.Enabled = false; + this.rows.Location = new System.Drawing.Point(496, 209); + this.rows.Name = "rows"; + this.rows.ReadOnly = true; + this.rows.Size = new System.Drawing.Size(100, 20); + this.rows.TabIndex = 18; + // + // columns + // + this.columns.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.columns.Enabled = false; + this.columns.Location = new System.Drawing.Point(496, 183); + this.columns.Name = "columns"; + this.columns.ReadOnly = true; + this.columns.Size = new System.Drawing.Size(100, 20); + this.columns.TabIndex = 17; + // + // openFileDialog1 + // + this.openFileDialog1.FileName = ""; + // + // label8 + // + this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(424, 64); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(115, 26); + this.label8.TabIndex = 21; + this.label8.Text = "Image Info"; + // + // dimensions + // + this.dimensions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.dimensions.AutoSize = true; + this.dimensions.Location = new System.Drawing.Point(426, 90); + this.dimensions.Name = "dimensions"; + this.dimensions.Size = new System.Drawing.Size(64, 13); + this.dimensions.TabIndex = 22; + this.dimensions.Text = "Dimensions:"; + // + // animated + // + this.animated.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.animated.AutoSize = true; + this.animated.Location = new System.Drawing.Point(426, 103); + this.animated.Name = "animated"; + this.animated.Size = new System.Drawing.Size(65, 13); + this.animated.TabIndex = 23; + this.animated.Text = "Is Animated:"; + // + // total + // + this.total.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.total.AutoSize = true; + this.total.Location = new System.Drawing.Point(494, 232); + this.total.Name = "total"; + this.total.Size = new System.Drawing.Size(37, 13); + this.total.TabIndex = 25; + this.total.Text = "Total :"; + // + // genprev + // + this.genprev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.genprev.Enabled = false; + this.genprev.Location = new System.Drawing.Point(424, 386); + this.genprev.Name = "genprev"; + this.genprev.Size = new System.Drawing.Size(280, 23); + this.genprev.TabIndex = 26; + this.genprev.Text = "Generate Preview"; + this.genprev.UseVisualStyleBackColor = true; + this.genprev.Click += new System.EventHandler(this.button4_Click); + // + // prefix + // + this.prefix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.prefix.Location = new System.Drawing.Point(461, 318); + this.prefix.Name = "prefix"; + this.prefix.Size = new System.Drawing.Size(100, 20); + this.prefix.TabIndex = 27; + this.prefix.TextChanged += new System.EventHandler(this.prefix_suffix_TextChanged); + // + // label9 + // + this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(422, 321); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(33, 13); + this.label9.TabIndex = 28; + this.label9.Text = "Prefix"; + // + // label10 + // + this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(422, 347); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(33, 13); + this.label10.TabIndex = 30; + this.label10.Text = "Suffix"; + // + // suffix + // + this.suffix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.suffix.Location = new System.Drawing.Point(461, 344); + this.suffix.Name = "suffix"; + this.suffix.Size = new System.Drawing.Size(100, 20); + this.suffix.TabIndex = 29; + this.suffix.TextChanged += new System.EventHandler(this.prefix_suffix_TextChanged); + // + // emotename + // + this.emotename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.emotename.AutoSize = true; + this.emotename.Location = new System.Drawing.Point(422, 368); + this.emotename.Name = "emotename"; + this.emotename.Size = new System.Drawing.Size(128, 13); + this.emotename.TabIndex = 31; + this.emotename.Text = "Example emote name: XX"; + // + // downscale + // + this.downscale.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.downscale.AutoSize = true; + this.downscale.Checked = true; + this.downscale.CheckState = System.Windows.Forms.CheckState.Checked; + this.downscale.Location = new System.Drawing.Point(425, 521); + this.downscale.Name = "downscale"; + this.downscale.Size = new System.Drawing.Size(159, 17); + this.downscale.TabIndex = 32; + this.downscale.Text = "Downscale images to 128px"; + this.downscale.UseVisualStyleBackColor = true; + // + // gif + // + this.gif.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.gif.AutoSize = true; + this.gif.Location = new System.Drawing.Point(428, 262); + this.gif.Name = "gif"; + this.gif.Size = new System.Drawing.Size(147, 17); + this.gif.TabIndex = 33; + this.gif.Text = "Enable GIF support (slow)"; + this.gif.UseVisualStyleBackColor = true; + this.gif.CheckedChanged += new System.EventHandler(this.gif_CheckedChanged); + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(426, 285); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(134, 13); + this.label5.TabIndex = 34; + this.label5.Text = "Delay between frames (ms)"; + // + // delay + // + this.delay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.delay.Enabled = false; + this.delay.Location = new System.Drawing.Point(566, 282); + this.delay.Name = "delay"; + this.delay.Size = new System.Drawing.Size(72, 20); + this.delay.TabIndex = 35; + // + // savprev + // + this.savprev.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.savprev.Location = new System.Drawing.Point(12, 517); + this.savprev.Name = "savprev"; + this.savprev.Size = new System.Drawing.Size(407, 23); + this.savprev.TabIndex = 41; + this.savprev.Text = "Save Preview"; + this.savprev.UseVisualStyleBackColor = true; + this.savprev.Click += new System.EventHandler(this.savprev_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange; + this.BackColor = System.Drawing.SystemColors.Control; + this.ClientSize = new System.Drawing.Size(716, 547); + this.Controls.Add(this.savprev); + this.Controls.Add(this.delay); + this.Controls.Add(this.label5); + this.Controls.Add(this.gif); + this.Controls.Add(this.downscale); + this.Controls.Add(this.emotename); + this.Controls.Add(this.label10); + this.Controls.Add(this.suffix); + this.Controls.Add(this.label9); + this.Controls.Add(this.prefix); + this.Controls.Add(this.genprev); + this.Controls.Add(this.total); + this.Controls.Add(this.animated); + this.Controls.Add(this.dimensions); + this.Controls.Add(this.label8); + this.Controls.Add(this.label6); + this.Controls.Add(this.label7); + this.Controls.Add(this.rows); + this.Controls.Add(this.columns); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.ssize); + this.Controls.Add(this.preview); + this.Controls.Add(this.gen); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.path); + this.Controls.Add(this.file); + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Image Splitter"; + ((System.ComponentModel.ISupportInitialize)(this.preview)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + } #endregion @@ -403,12 +456,16 @@ private void InitializeComponent() private System.Windows.Forms.Label dimensions; private System.Windows.Forms.Label animated; private System.Windows.Forms.Label total; - private System.Windows.Forms.Button genprev; - private System.Windows.Forms.TextBox prefix; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox surfix; - private System.Windows.Forms.Label emotename; - private System.Windows.Forms.CheckBox downscale; + private System.Windows.Forms.Button genprev; + private System.Windows.Forms.TextBox prefix; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox suffix; + private System.Windows.Forms.Label emotename; + private System.Windows.Forms.CheckBox downscale; + private System.Windows.Forms.CheckBox gif; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox delay; + private System.Windows.Forms.Button savprev; } } diff --git a/src/ImageSplitter.Winfroms/Form1.resx b/src/ImageSplitter.Winfroms/Form1.resx index 934e933..59e382e 100644 --- a/src/ImageSplitter.Winfroms/Form1.resx +++ b/src/ImageSplitter.Winfroms/Form1.resx @@ -1,190 +1,190 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - iVBORw0KGgoAAAANSUhEUgAAAZwAAAEYCAIAAADnAtegAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAADJJJREFUeF7t3eth27gSBtDU5YJcj6txMy5ml5JohyBBPChQkcbn/LpXpsDBDPSt - HMvJn/8AAhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQa - EIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCK - UANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilAD - QhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IR - akAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpA - KEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChC - DQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0I - RagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUbr4+3v58e/v4mh/lmX2+zwOb - vH/ODwb3/Of0CSoUajdC7fUINaGWJdRuhNrrEWpCLUuo3Qi11yPUhFqWULsRaq9HqAm1LKHGqxJqQi1L - qPGqhJpQyxJqvCqhJtSyhBqvSqgJtaz7Q+3r2/z/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gFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagB - oQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEI - NSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUg - FKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAg//33Py2njtrd2HHm - AAAAAElFTkSuQmCC - - - - 17, 17 - - - 186, 17 - - - 83 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + iVBORw0KGgoAAAANSUhEUgAAAZwAAAEYCAIAAADnAtegAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAADJJJREFUeF7t3eth27gSBtDU5YJcj6txMy5ml5JohyBBPChQkcbn/LpXpsDBDPSt + HMvJn/8AAhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQa + EIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCK + UANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilAD + QhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IR + akAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCD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OegFD7XXr+gOxCpvFyhNrvkoRU/btJmcbrEWq/TBJT5VhLPxfwj36SBb2E2q+TRNX1 + Z1fLn3XeXH/KNV9w420ar0Ko/ULpu7WF7c/+ZyKN1yHUfqeWT2bOFh8mhRcg1H6vr8unxEvRdv3OdL4Y + XoVQ4/LZtfm3smetH2KDJyTUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAo + Qg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEIN + CEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhF + qAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagB + oQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUgFKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEI + NSAUoQaEItSAUIQaEIpQA0IRakAoQg0IRagBoQg1IBShBoQi1IBQhBoQilADQhFqQChCDQhFqAGhCDUg + FKEGhCLUgFCEGhCKUANCEWpAKEINCEWoAaEINSAUoQaEItSAUIQaEIpQA0IRakAg//33Py2njtrd2HHm + AAAAAElFTkSuQmCC + + + + 17, 17 + + + 186, 17 + + + 50 + \ No newline at end of file diff --git a/src/ImageSplitter.Winfroms/ImageSplitter.Winforms.csproj b/src/ImageSplitter.Winfroms/ImageSplitter.Winforms.csproj index 5d8f41b..815a354 100644 --- a/src/ImageSplitter.Winfroms/ImageSplitter.Winforms.csproj +++ b/src/ImageSplitter.Winfroms/ImageSplitter.Winforms.csproj @@ -1,135 +1,138 @@ - - - - - Debug - AnyCPU - {D5A3E066-AA9D-4C9F-A6DA-BDFC91F3FD4A} - WinExe - ImageSplitter.Winfroms - ImageSplitter.Winfroms - v4.6.1 - 512 - true - true - false - C:\Users\Ryhon\Desktop\Splitter\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.1.0.%2a - false - true - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - false - - - 29A55456E14EC78B8FB9F2F5DB7C1D944A3F5D76 - - - false - - - LocalIntranet - - - Properties\app.manifest - - - - - - - - - - - - - - - - - Form - Winforms - - - Form1.cs - - - - - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - {87f845dd-8947-4581-8991-a60bb9d8471c} - ImageSplitter - - - - - False - Microsoft .NET Framework 4.6.1 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - + + + + + Debug + AnyCPU + {D5A3E066-AA9D-4C9F-A6DA-BDFC91F3FD4A} + WinExe + ImageSplitter.Winfroms + ImageSplitter.Winfroms + v4.6.1 + 512 + true + true + false + C:\Users\Ryhon\Desktop\Splitter\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.2.0.%2a + false + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + false + + + 29A55456E14EC78B8FB9F2F5DB7C1D944A3F5D76 + + + false + + + LocalIntranet + + + Properties\app.manifest + + + + + + + + + + + + + + + + + + + + Form + Winforms + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {87f845dd-8947-4581-8991-a60bb9d8471c} + ImageSplitter + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + \ No newline at end of file diff --git a/src/ImageSplitter.Winfroms/Properties/app.manifest b/src/ImageSplitter.Winfroms/Properties/app.manifest index 3b5ed3d..5157b9e 100644 --- a/src/ImageSplitter.Winfroms/Properties/app.manifest +++ b/src/ImageSplitter.Winfroms/Properties/app.manifest @@ -1,9 +1,9 @@ - - - - - - + + + + + + - - - - - - - - - - + --> + + + + + + + + + + - - - - - - - - - - - - + and Windows will automatically select the most compatible environment. --> + + + + + + + + + + + + + also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> - + --> + + --> \ No newline at end of file diff --git a/src/ImageSplitter/ImageSplitter.csproj b/src/ImageSplitter/ImageSplitter.csproj index 4176b38..b5acd8d 100644 --- a/src/ImageSplitter/ImageSplitter.csproj +++ b/src/ImageSplitter/ImageSplitter.csproj @@ -1,76 +1,84 @@ - - - - Debug - AnyCPU - {87F845DD-8947-4581-8991-A60BB9D8471C} - Exe - ImageSplitter - ImageSplitter - v4.6.1 - - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.1.0.%2a - false - true - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - - - true - bin\Release - prompt - 4 - false - - - ImageSplitter.Program - - - true - - - - - - ..\packages\System.Drawing.Common.4.5.0\lib\net461\System.Drawing.Common.dll - - - - - - - - - - False - Microsoft .NET Framework 4.6.1 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - + + + + Debug + AnyCPU + {87F845DD-8947-4581-8991-A60BB9D8471C} + Exe + ImageSplitter + ImageSplitter + v4.6.1 + + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.2.0.%2a + false + true + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + true + bin\Release + prompt + 4 + false + + + ImageSplitter.Program + + + true + + + + + + ..\packages\System.Drawing.Common.4.5.0\lib\net461\System.Drawing.Common.dll + + + + + + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + PreserveNewest + + + \ No newline at end of file diff --git a/src/ImageSplitter/Program.cs b/src/ImageSplitter/Program.cs index d7a5fd0..d30934c 100644 --- a/src/ImageSplitter/Program.cs +++ b/src/ImageSplitter/Program.cs @@ -4,7 +4,8 @@ using System.Text; using System.Threading.Tasks; using System.Drawing; - +using System.Drawing.Imaging; + namespace ImageSplitter { class Program @@ -15,24 +16,24 @@ public static void Main(string[] args) string file = Console.ReadLine(); int? size = null; - while (size == null) - { - try - { - Console.WriteLine("Enter the emote size"); - size = int.Parse(Console.ReadLine()); - } - catch - { - Console.WriteLine("Failed to parse the size"); - } + while (size == null) + { + try + { + Console.WriteLine("Enter the emote size"); + size = int.Parse(Console.ReadLine()); + } + catch + { + Console.WriteLine("Failed to parse the size"); + } } Console.WriteLine("Enter the emote prefix"); string prefix = Console.ReadLine(); Console.WriteLine("Enter the emote surfix"); - string surfix = Console.ReadLine(); + string suffix = Console.ReadLine(); Console.WriteLine("Enter the output folder path"); string output = Console.ReadLine(); diff --git a/src/ImageSplitter/Splitter.cs b/src/ImageSplitter/Splitter.cs index 305b9c3..7e17fe8 100644 --- a/src/ImageSplitter/Splitter.cs +++ b/src/ImageSplitter/Splitter.cs @@ -10,8 +10,9 @@ namespace ImageSplitter { public class Splitter { - public static void Split(Image src, int size, string OutputLocation, string prefix, string surfix, bool downscale = true) + public static void Split(Image src, int size, string OutputLocation, string prefix, string suffix, bool downscale) { + Directory.CreateDirectory(OutputLocation); Image tile = new Bitmap(size, size); Size emotesize = new Size(128, 128); @@ -34,8 +35,9 @@ public static void Split(Image src, int size, string OutputLocation, string pref string emotetext = ""; for (int i = 0; i < columns * rows; i++) { - new Bitmap(image.Clone(new Rectangle(column * tile.Width, row * tile.Height, tile.Width, tile.Height), image.PixelFormat), emotesize).Save(OutputLocation + "/" + prefix + i.ToString("D2").Replace("100", "100~1").Replace("1234", "1234~1") + surfix + ".jpg"); - emotetext += ":" + prefix + i.ToString("D2").Replace("100", "100~1").Replace("1234", "1234~1") + surfix + ":"; + new Bitmap(image.Clone(new Rectangle(column * tile.Width, row * tile.Height, tile.Width, tile.Height), image.PixelFormat), emotesize).Save(OutputLocation + "/" + prefix + i.ToString("D2").Replace("100", "100~1").Replace("1234", "1234~1") + suffix + ".jpg"); + emotetext += ":" + prefix + i.ToString("D2").Replace("100", "100~1").Replace("1234", "1234~1") + suffix + ":"; + if (column == columns - 1) { column = 0;