Bitmap
Bitmap
Image);
SaveFileDialog saveFileDialog = new SaveFileDialog();
if(DialogResult.OK == saveFileDialog.ShowDialog())
{
copy.Save(saveFileDialog.FileName);
}
textBox1.Text = "File hasil proses disimpan.";
if(DialogResult.OK == openFileDialog.ShowDialog() )
{
this.AutoScroll = true;
this.origImage.Image = new
Bitmap(openFileDialog.FileName);
this.Invalidate();
unsafe
{
byte * p = (byte *)(void *)Scan0;
int nOffset = stride - b.Width*3;
r_data = new byte[b.Width,b.Height];
g_data = new byte[b.Width,b.Height];
b_data = new byte[b.Width,b.Height];
for(int y=0;y<b.Height;++y)
{
for(int x=0;x<b.Width;++x)
{
b_data[x,y] = p[0];
g_data[x,y] = p[1];
r_data[x,y] = p[2];
p += 3;
}
p += nOffset;
}
}
}
textBox1.Text = "File " + openFileDialog.FileName + "
dibuka.\n ";