Last active
December 14, 2015 02:08
-
-
Save mckelvin/5011018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//简单去边框 | |
public static Bitmap setBoundWhite(Bitmap bmap){ | |
Bitmap image = new Bitmap(bmap); | |
int i, Height = image.Height,Width =image.Width; | |
//去边框 | |
for (i = 0; i < Width; i++) | |
{ | |
image.SetPixel(i, 0, Color.White); | |
image.SetPixel(i, Height - 1, Color.White); | |
} | |
//去边框 | |
for (i = 0; i < Height; i++) | |
{ | |
image.SetPixel(0, i, Color.White); | |
image.SetPixel(Width - 1, i, Color.White); | |
} | |
return image; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment