1 write to _image
System.Drawing.Common.Tests (1)
System\Drawing\ImageConverterTests.cs (1)
19_image = Image.FromFile(Path.Combine("bitmaps", "TestImage.bmp"));
39 references to _image
System.Drawing.Common.Tests (39)
System\Drawing\ImageConverterTests.cs (39)
20_imageStr = _image.ToString(); 24_image.Save(destStream, _image.RawFormat); 29_imgConvFrmTD = (ImageConverter)TypeDescriptor.GetConverter(_image); 127Assert.Equal(_image.Height, newImage.Height); 128Assert.Equal(_image.Width, newImage.Width); 132Assert.Equal(_image.Height, newImage.Height); 133Assert.Equal(_image.Width, newImage.Width); 157Assert.Equal(_imageStr, (string)_imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(string))); 158Assert.Equal(_imageStr, (string)_imgConv.ConvertTo(_image, typeof(string))); 159Assert.Equal(_imageStr, (string)_imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(string))); 160Assert.Equal(_imageStr, (string)_imgConvFrmTD.ConvertTo(_image, typeof(string))); 175byte[] newImageBytes = (byte[])_imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType()); 178newImageBytes = (byte[])_imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType()); 181newImageBytes = (byte[])_imgConvFrmTD.ConvertTo(_image, _imageBytes.GetType()); 197Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Rectangle))); 198Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, _image.GetType())); 199Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Size))); 200Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Bitmap))); 201Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Point))); 202Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Metafile))); 203Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(object))); 204Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(int))); 206Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Rectangle))); 207Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, _image.GetType())); 208Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Size))); 209Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Bitmap))); 210Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Point))); 211Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(Metafile))); 212Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(object))); 213Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(int))); 232propsColl = _imgConv.GetProperties(null, _image, null); 236propsColl = _imgConv.GetProperties(null, _image); 238propsColl = _imgConv.GetProperties(_image); 246propsColl = _imgConvFrmTD.GetProperties(null, _image, null); 250propsColl = _imgConvFrmTD.GetProperties(null, _image); 252propsColl = _imgConvFrmTD.GetProperties(_image);