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
);
127
Assert.Equal(
_image
.Height, newImage.Height);
128
Assert.Equal(
_image
.Width, newImage.Width);
132
Assert.Equal(
_image
.Height, newImage.Height);
133
Assert.Equal(
_image
.Width, newImage.Width);
157
Assert.Equal(_imageStr, (string)_imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(string)));
158
Assert.Equal(_imageStr, (string)_imgConv.ConvertTo(
_image
, typeof(string)));
159
Assert.Equal(_imageStr, (string)_imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(string)));
160
Assert.Equal(_imageStr, (string)_imgConvFrmTD.ConvertTo(
_image
, typeof(string)));
175
byte[] newImageBytes = (byte[])_imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, _imageBytes.GetType());
178
newImageBytes = (byte[])_imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, _imageBytes.GetType());
181
newImageBytes = (byte[])_imgConvFrmTD.ConvertTo(
_image
, _imageBytes.GetType());
197
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Rectangle)));
198
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
,
_image
.GetType()));
199
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Size)));
200
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Bitmap)));
201
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Point)));
202
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Metafile)));
203
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(object)));
204
Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(int)));
206
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Rectangle)));
207
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
,
_image
.GetType()));
208
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Size)));
209
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Bitmap)));
210
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Point)));
211
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(Metafile)));
212
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(object)));
213
Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture,
_image
, typeof(int)));
232
propsColl = _imgConv.GetProperties(null,
_image
, null);
236
propsColl = _imgConv.GetProperties(null,
_image
);
238
propsColl = _imgConv.GetProperties(
_image
);
246
propsColl = _imgConvFrmTD.GetProperties(null,
_image
, null);
250
propsColl = _imgConvFrmTD.GetProperties(null,
_image
);
252
propsColl = _imgConvFrmTD.GetProperties(
_image
);