我使用下面的代码(改编自 )来调整图像的大小,保持方面ratio.But,我一直在调整images.What Im的大小时得到一个白色边框,这样做是错误的。
Bitmap ResizekeepAspectRatio(Bitmap imgPhoto, int Width, int Height)
{
int sourceWidth = imgPhoto.Width;
int sourceHeight = imgPhoto.Height;
int sourceX = 0;
我想为我的整个页面的左边和右边的边框,但每当我试图设置它只是白色的边框图像,我可以改变颜色没有问题,但我希望它是一个特定的png图像只在页面的左侧和右侧。 我已经尝试了所有的边框图像属性,并且我已经将左右边框设置为透明。我也试过更改我的文件路径,但我知道这不是问题所在,因为我在其他地方放置了相同的图像。 Image Of Webpage Borders Sketch <div id="margins">
ENTIRE BODY OF PAGE HERE WOULD BE HERE
</div> #margins {
border-left
我想在图像中的每个像素上找到切线。注:图像为白色背景,形状边框颜色为方块。
我所做的是,阿尔戈
While(true)
take pixel
if pixel color is black
make 3 X 3 matrix => fill the matrix by surrounding pixel color
...means assume white =0 and black=1 then keeping selected pixel
at center for 3 X 3 matrix