102 lines
3.0 KiB
C#
102 lines
3.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace KRY_0x02
|
|
{
|
|
public partial class main_form : Form
|
|
{
|
|
public main_form()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public string getpath(TextBox t)
|
|
{
|
|
string path = t.Text;
|
|
return path;
|
|
}
|
|
|
|
//Bitmap my_bitmap = new Bitmap(getpath(textBox1));
|
|
Color pixel;
|
|
int int_value;
|
|
//for (int i = 0; i<my_bitmap.Witdh - 1; i++)
|
|
//{
|
|
|
|
//}
|
|
|
|
|
|
class do_a_stego
|
|
{
|
|
public string putthere()
|
|
{
|
|
return "";
|
|
}
|
|
public string gimme()
|
|
{
|
|
return "";
|
|
}
|
|
}
|
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
// put
|
|
}
|
|
|
|
|
|
private void button4_Click(object sender, EventArgs e)
|
|
{
|
|
/*
|
|
* Wrap the creation of the OpenFileDialog instance in a using statement,
|
|
* rather than manually calling the Dispose method to ensure proper disposal
|
|
*/
|
|
|
|
using (OpenFileDialog dlg = new OpenFileDialog())
|
|
{
|
|
dlg.Title = "pick a pic";
|
|
dlg.Filter = "png (*.png)|*.png|bmp (*.bmp)|*.bmp|tiff (*.tiff)|*.tiff";
|
|
|
|
if (dlg.ShowDialog() == DialogResult.OK)
|
|
{
|
|
label5pathtopic.Text = @"path/to/pic";
|
|
pictureBox1.Image = new Bitmap(dlg.FileName);
|
|
pictureBox1.SizeMode = PictureBoxSizeMode.Normal;
|
|
textBox3.Text = dlg.FileName;
|
|
textBox4height.Text = pictureBox1.Image.Height.ToString();
|
|
textBox5width.Text = pictureBox1.Image.Width.ToString();
|
|
}
|
|
}
|
|
}
|
|
|
|
private void button5_Click(object sender, EventArgs e)
|
|
{
|
|
/*/* use-default-pic button */
|
|
string filename = @"C:\Users\citizen\source\repos\KRY-0x02\security.png";
|
|
pictureBox1.Image = new Bitmap(filename);
|
|
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
|
|
label5pathtopic.Text = $"Security: Actual actual reality: nobody cares about his secrets."
|
|
+ " (Also, I would be hard-pressed to find that wrench for $5.)";
|
|
textBox3.Text = filename + "\t\t by randall ... https://xkcd.com/538";
|
|
textBox4height.Text = pictureBox1.Image.Height.ToString();
|
|
textBox5width.Text = pictureBox1.Image.Width.ToString();
|
|
}
|
|
|
|
private void button6_Click(object sender, EventArgs e)
|
|
{
|
|
/* clear pic selection */
|
|
label5pathtopic.Text = @"path/to/pic";
|
|
pictureBox1.Image = null;
|
|
textBox3.Text = "";
|
|
textBox4height.Text = "";
|
|
textBox5width.Text = "";
|
|
}
|
|
}
|
|
}
|