编译项目时遇到问题:两个代码的模糊引用
Image img = pictureBox1.Image.Crop(_selection);
和
pictureBox1.Image = img.Fit2PictureBox(pictureBox1);
分别是错误的
Error 1 The call is ambiguous between the following methods or properties:
'gfoidl.Imaging.ImageExtension.Crop(System.Drawing.Image, System.Drawing.Rectangle)' and
'gfoidl.Imaging.ImageExtension.Crop(System.Drawing.Image, System.Drawing.Rectangle)' E:\2012-11 (Nov)\Cropping of Images\Form1.cs 76 29 Cropping of Images
Error 2 The call is ambiguous between the following methods or properties:
'gfoidl.Imaging.ImageExtension.Fit2PictureBox(System.Drawing.Image, System.Windows.Forms.PictureBox)' and
'gfoidl.Imaging.ImageExtension.Fit2PictureBox(System.Drawing.Image, System.Windows.Forms.PictureBox)' E:\2012-11 (Nov)\Cropping of Images\Form1.cs 79 25 Cropping of Images
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && _selecting)
{
// Create cropped image:
Image img = pictureBox1.Image.Crop(_selection);
// Fit image to the picturebox:
pictureBox1.Image = img.Fit2PictureBox(pictureBox1);
_selecting = false;
}
}
如果你能告诉我如何引用那些没有含糊不清的内容