63 references to FromFile
System.Drawing.Common.Tests (11)
mono\System.Drawing.Imaging\IconCodecTests.cs (2)
42
using Image image = Image.
FromFile
(sInFile);
59
using Image image = Image.
FromFile
(sInFile);
mono\System.Drawing\GraphicsTests.cs (1)
346
using Image img = Image.
FromFile
(sInFile);
System\Drawing\ImageConverterTests.cs (1)
19
_image = Image.
FromFile
(Path.Combine("bitmaps", "TestImage.bmp"));
System\Drawing\ImageTests.cs (6)
496
Assert.Throws<OutOfMemoryException>(() => Image.
FromFile
(file.Path));
503
AssertExtensions.Throws<ArgumentNullException>("path", () => Image.
FromFile
(null));
510
AssertExtensions.Throws<ArgumentException>("path", null, () => Image.
FromFile
(string.Empty));
522
Assert.Throws<PathTooLongException>(() => Image.
FromFile
(fileName));
530
Assert.Throws<FileNotFoundException>(() => Image.
FromFile
(fileName));
539
Assert.Throws<FileNotFoundException>(() => Image.
FromFile
("NoSuchFile"));
System\Drawing\Imaging\ImageFormatTests.cs (1)
110
var img = Image.
FromFile
(path);
System.Windows.Forms.Design.Tests (2)
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (2)
317
using Bitmap expected = (Bitmap)Image.
FromFile
(@"Resources\Image1.png");
373
using Bitmap expected = (Bitmap)Image.
FromFile
(@"Resources\Image1.png");
System.Windows.Forms.Tests (32)
System\Windows\Forms\ToolStripControlHostTests.cs (6)
400
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")) };
401
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) };
1211
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")) };
1212
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) };
1337
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), color };
1338
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color };
System\Windows\Forms\ToolStripItemTests.cs (20)
1769
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")) };
1770
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) };
1865
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), 1 };
1866
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), 1 };
3785
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")) };
3786
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) };
3815
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), -1 };
3816
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), -1 };
3889
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), 1 };
3890
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), 1 };
5603
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), color };
5604
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color };
5670
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 };
5671
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 };
5672
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 };
5673
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 };
5737
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 };
5738
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 };
5739
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 };
5740
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 };
System\Windows\Forms\ToolStripSeparatorTests.cs (6)
114
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")) };
115
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) };
421
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")) };
422
yield return new object[] { imageTransparentColor, Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) };
531
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "nature24bits.gif")), color };
532
yield return new object[] { Image.
FromFile
(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color };
System.Windows.Forms.UI.IntegrationTests (1)
ToolStripTests.cs (1)
17
_sharedImageList.Images.Add("square", Image.
FromFile
("./Resources/image.png"));
WinFormsControlsTest (17)
CollectionEditors.cs (4)
26
imageList.Images.Add("SmallA", Image.
FromFile
("Images\\SmallA.bmp"));
27
imageList.Images.Add(Image.
FromFile
("Images\\SmallABlue.bmp"));
28
imageList.Images.Add("LargeA", Image.
FromFile
("Images\\LargeA.bmp"));
29
imageList.Images.Add(Image.
FromFile
("Images\\LargeABlue.bmp"));
DataGridViewTest.cs (1)
30
column6.Image = Image.
FromFile
("Images\\SmallA.bmp");
ListViewTest.cs (6)
130
imageListSmall.Images.Add(Image.
FromFile
("Images\\SmallA.bmp"));
131
imageListSmall.Images.Add(Image.
FromFile
("Images\\SmallABlue.bmp"));
132
imageListLarge.Images.Add(Image.
FromFile
("Images\\LargeA.bmp"));
133
imageListLarge.Images.Add(Image.
FromFile
("Images\\LargeABlue.bmp"));
249
Bitmap bitmap = (Bitmap)Image.
FromFile
(file);
280
Bitmap bitmap = (Bitmap)Image.
FromFile
(file);
MultipleControls.cs (4)
92
imageListSmall.Images.Add(Image.
FromFile
("Images\\SmallA.bmp"));
93
imageListSmall.Images.Add(Image.
FromFile
("Images\\SmallABlue.bmp"));
94
imageListLarge.Images.Add(Image.
FromFile
("Images\\LargeA.bmp"));
95
imageListLarge.Images.Add(Image.
FromFile
("Images\\LargeABlue.bmp"));
ToolStripTests.cs (2)
20
toolStrip2_Button4.Image = Image.
FromFile
("Images\\SmallA.bmp");
22
toolStrip2_Button5.Image = Image.
FromFile
("Images\\SmallABlue.bmp");