Skip to content

Instantly share code, notes, and snippets.

@kasramp
Created August 2, 2020 10:15
Show Gist options
  • Save kasramp/2618ee43d6396ea7d6c32505671595c4 to your computer and use it in GitHub Desktop.
Save kasramp/2618ee43d6396ea7d6c32505671595c4 to your computer and use it in GitHub Desktop.
private void zoomIn(PictureBox picImp) {
y = new System.Drawing.Bitmap(2 * (x.Width), 2 * (x.Height));
for (int i = 0; i <= x.Width - 1; i++) {
for (int j = 0; j <= x.Height - 1; j++) {
z = x.GetPixel(i, j);
y.SetPixel(i * 2, j * 2, z);
y.SetPixel(i * 2 + 1, j * 2, z);
y.SetPixel(i * 2, j * 2 + 1, z);
y.SetPixel(i * 2 + 1, j * 2 + 1, z);
}
}
Message.setMessage(PicSave.savechange(picImp, y), "ZoomIn");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment