Imagizer // Fast and Easy Image Converter 08-17-2015, 08:22 PM
#1
Such a snazzy name but here is an image converter I made a while ago. Just feed like releasing it because why not :plz:
Converts from PNG to Jpeg, vice versa.
![[Image: 5xXRnlY.png]](http://i.imgur.com/5xXRnlY.png)
Converts from PNG to Jpeg, vice versa.
![[Image: 5xXRnlY.png]](http://i.imgur.com/5xXRnlY.png)
Code:
// Some are probably not needed lmao
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;
using System.Drawing.Imaging;
// Very nice name :3
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
Image img;
// Ignore this shit jsut does shit :D
public Form1()
{
InitializeComponent();
}
// Open button
private void button1_Click(object sender, EventArgs e)
{
DialogResult dr = openFileDialog1.ShowDialog();
if(dr == DialogResult.OK)
{
img = Image.FromFile(openFileDialog1.FileName);
pictureBox1.Image = img;
}
}
// Save button
private void button2_Click(object sender, EventArgs e)
{
DialogResult dr = saveFileDialog1.ShowDialog();
if (dr == DialogResult.OK)
{
if (img != null)
{
if (saveFileDialog1.FileName.Substring(saveFileDialog1.FileName.Length - 3).ToLower() == "jpg")
{
img.Save(saveFileDialog1.FileName, ImageFormat.Jpeg);
}
if (saveFileDialog1.FileName.Substring(saveFileDialog1.FileName.Length - 3).ToLower() == "png")
{
img.Save(saveFileDialog1.FileName, ImageFormat.Png);
}
}
}
}
}
}
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)

![[Image: 1i4r3vK.jpg]](http://i.imgur.com/1i4r3vK.jpg)
![[Image: Rs115Wh.png]](http://i.imgur.com/Rs115Wh.png)