34 instantiations of ImageFormat
System.Drawing.Common (14)
System\Drawing\Image.cs (1)
510return new ImageFormat(guid);
System\Drawing\ImageFormatConverter.cs (1)
43return new ImageFormat(guid);
System\Drawing\Imaging\ImageFormat.cs (12)
17private static readonly ImageFormat s_memoryBMP = new(PInvokeCore.ImageFormatMemoryBMP); 18private static readonly ImageFormat s_bmp = new(PInvokeCore.ImageFormatBMP); 19private static readonly ImageFormat s_emf = new(PInvokeCore.ImageFormatEMF); 20private static readonly ImageFormat s_wmf = new(PInvokeCore.ImageFormatWMF); 21private static readonly ImageFormat s_jpeg = new(PInvokeCore.ImageFormatJPEG); 22private static readonly ImageFormat s_png = new(PInvokeCore.ImageFormatPNG); 23private static readonly ImageFormat s_gif = new(PInvokeCore.ImageFormatGIF); 24private static readonly ImageFormat s_tiff = new(PInvokeCore.ImageFormatTIFF); 25private static readonly ImageFormat s_exif = new(PInvokeCore.ImageFormatEXIF); 26private static readonly ImageFormat s_icon = new(PInvokeCore.ImageFormatIcon); 27private static readonly ImageFormat s_heif = new(PInvokeCore.ImageFormatHEIF); 28private static readonly ImageFormat s_webp = new(PInvokeCore.ImageFormatWEBP);
System.Drawing.Common.Tests (20)
System\Drawing\Imaging\ImageFormatTests.cs (20)
8private static ImageFormat BmpImageFormat { get; } = new(new Guid("b96b3cab-0728-11d3-9d7b-0000f81ef32e")); 9private static ImageFormat EmfImageFormat { get; } = new(new Guid("b96b3cac-0728-11d3-9d7b-0000f81ef32e")); 10private static ImageFormat ExifImageFormat { get; } = new(new Guid("b96b3cb2-0728-11d3-9d7b-0000f81ef32e")); 11private static ImageFormat GifImageFormat { get; } = new(new Guid("b96b3cb0-0728-11d3-9d7b-0000f81ef32e")); 12private static ImageFormat TiffImageFormat { get; } = new(new Guid("b96b3cb1-0728-11d3-9d7b-0000f81ef32e")); 13private static ImageFormat PngImageFormat { get; } = new(new Guid("b96b3caf-0728-11d3-9d7b-0000f81ef32e")); 14private static ImageFormat MemoryBmpImageFormat { get; } = new(new Guid("b96b3caa-0728-11d3-9d7b-0000f81ef32e")); 15private static ImageFormat IconImageFormat { get; } = new(new Guid("b96b3cb5-0728-11d3-9d7b-0000f81ef32e")); 16private static ImageFormat JpegImageFormat { get; } = new(new Guid("b96b3cae-0728-11d3-9d7b-0000f81ef32e")); 17private static ImageFormat WmfImageFormat { get; } = new(new Guid("b96b3cad-0728-11d3-9d7b-0000f81ef32e")); 18private static ImageFormat HeifImageFormat { get; } = new(new Guid("{b96b3cb6-0728-11d3-9d7b-0000f81ef32e}")); 19private static ImageFormat WebpImageFormat { get; } = new(new Guid("{b96b3cb7-0728-11d3-9d7b-0000f81ef32e}")); 20private static ImageFormat CustomImageFormat { get; } = new(new Guid("48749428-316f-496a-ab30-c819a92b3137")); 85yield return new object[] { new ImageFormat(new Guid("48749428-316f-496a-ab30-c819a92b3137")), new ImageFormat(new Guid("48749428-316f-496a-ab30-c819a92b3137")), true }; 86yield return new object[] { new ImageFormat(new Guid("48749428-316f-496a-ab30-c819a92b3137")), new ImageFormat(new Guid("b96b3cad-0728-11d3-9d7b-0000f81ef32e")), false }; 87yield return new object[] { new ImageFormat(new Guid("48749428-316f-496a-ab30-c819a92b3137")), null, false }; 88yield return new object[] { new ImageFormat(new Guid("48749428-316f-496a-ab30-c819a92b3137")), new(), false }; 125Assert.Equal(guid.GetHashCode(), new ImageFormat(guid).GetHashCode());
260 references to ImageFormat
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
92metafile.Save(imageStream, ImageFormat.Png);
System.Drawing (1)
System.Drawing.cs (1)
90[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Imaging.ImageFormat))]
System.Drawing.Common (86)
System\Drawing\Bitmap.cs (1)
231if (RawFormat.Guid == ImageFormat.Icon.Guid)
System\Drawing\Graphics.cs (1)
2645if (errorStatus != Status.Ok && image.RawFormat.Equals(ImageFormat.Emf))
System\Drawing\Image.cs (4)
226public void Save(string filename, ImageFormat format) 293public void Save(Stream stream, ImageFormat format) 503public ImageFormat RawFormat 872if (!image.RawFormat.Equals(ImageFormat.Gif))
System\Drawing\ImageFormatConverter.cs (39)
48return ImageFormat.Bmp; 50return ImageFormat.Emf; 52return ImageFormat.Exif; 54return ImageFormat.Gif; 56return ImageFormat.Icon; 58return ImageFormat.Jpeg; 60return ImageFormat.MemoryBmp; 62return ImageFormat.Png; 64return ImageFormat.Tiff; 66return ImageFormat.Wmf; 68return ImageFormat.Heif; 70return ImageFormat.Webp; 72throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, strFormat, nameof(ImageFormat))); 77if (value is ImageFormat imgFormat) 87if (imgFormat.Guid.Equals(ImageFormat.Bmp.Guid)) 89else if (imgFormat.Guid.Equals(ImageFormat.Emf.Guid)) 91else if (imgFormat.Guid.Equals(ImageFormat.Exif.Guid)) 93else if (imgFormat.Guid.Equals(ImageFormat.Gif.Guid)) 95else if (imgFormat.Guid.Equals(ImageFormat.Icon.Guid)) 97else if (imgFormat.Guid.Equals(ImageFormat.Jpeg.Guid)) 99else if (imgFormat.Guid.Equals(ImageFormat.MemoryBmp.Guid)) 101else if (imgFormat.Guid.Equals(ImageFormat.Png.Guid)) 103else if (imgFormat.Guid.Equals(ImageFormat.Tiff.Guid)) 105else if (imgFormat.Guid.Equals(ImageFormat.Wmf.Guid)) 110return new InstanceDescriptor(typeof(ImageFormat).GetProperty(strFormat), null); 114ConstructorInfo? ctor = typeof(ImageFormat).GetConstructor([typeof(Guid)]); 125return new StandardValuesCollection(new ImageFormat[] 127ImageFormat.MemoryBmp, 128ImageFormat.Bmp, 129ImageFormat.Emf, 130ImageFormat.Wmf, 131ImageFormat.Gif, 132ImageFormat.Jpeg, 133ImageFormat.Png, 134ImageFormat.Tiff, 135ImageFormat.Exif, 136ImageFormat.Icon, 137ImageFormat.Heif, 138ImageFormat.Webp
System\Drawing\Imaging\ImageFormat.cs (30)
17private static readonly ImageFormat s_memoryBMP = new(PInvokeCore.ImageFormatMemoryBMP); 18private static readonly ImageFormat s_bmp = new(PInvokeCore.ImageFormatBMP); 19private static readonly ImageFormat s_emf = new(PInvokeCore.ImageFormatEMF); 20private static readonly ImageFormat s_wmf = new(PInvokeCore.ImageFormatWMF); 21private static readonly ImageFormat s_jpeg = new(PInvokeCore.ImageFormatJPEG); 22private static readonly ImageFormat s_png = new(PInvokeCore.ImageFormatPNG); 23private static readonly ImageFormat s_gif = new(PInvokeCore.ImageFormatGIF); 24private static readonly ImageFormat s_tiff = new(PInvokeCore.ImageFormatTIFF); 25private static readonly ImageFormat s_exif = new(PInvokeCore.ImageFormatEXIF); 26private static readonly ImageFormat s_icon = new(PInvokeCore.ImageFormatIcon); 27private static readonly ImageFormat s_heif = new(PInvokeCore.ImageFormatHEIF); 28private static readonly ImageFormat s_webp = new(PInvokeCore.ImageFormatWEBP); 33/// Initializes a new instance of the <see cref='ImageFormat'/> class with the specified GUID. 38/// Specifies a global unique identifier (GUID) that represents this <see cref='ImageFormat'/>. 45public static ImageFormat MemoryBmp => s_memoryBMP; 50public static ImageFormat Bmp => s_bmp; 55public static ImageFormat Emf => s_emf; 60public static ImageFormat Wmf => s_wmf; 65public static ImageFormat Gif => s_gif; 70public static ImageFormat Jpeg => s_jpeg; 75public static ImageFormat Png => s_png; 80public static ImageFormat Tiff => s_tiff; 85public static ImageFormat Exif => s_exif; 90public static ImageFormat Icon => s_icon; 99public static ImageFormat Heif => s_heif; 108public static ImageFormat Webp => s_webp; 111/// Returns a value indicating whether the specified object is an <see cref='ImageFormat'/> equivalent to this 112/// <see cref='ImageFormat'/>. 114public override bool Equals([NotNullWhen(true)] object? o) => o is ImageFormat format && _guid == format._guid; 127/// Converts this <see cref='ImageFormat'/> to a human-readable string.
System\Drawing\Printing\PrinterSettings.cs (10)
330public bool IsDirectPrintingSupported(ImageFormat imageFormat) 332if (!imageFormat.Equals(ImageFormat.Jpeg) && !imageFormat.Equals(ImageFormat.Png)) 341private static bool IsDirectPrintingSupported(HDC hdc, ImageFormat imageFormat, out int escapeFunction) 343Debug.Assert(imageFormat == ImageFormat.Jpeg || imageFormat == ImageFormat.Png); 345escapeFunction = imageFormat.Equals(ImageFormat.Jpeg) 372ImageFormat imageFormat = image.RawFormat; 374if (!imageFormat.Equals(ImageFormat.Jpeg) && !imageFormat.Equals(ImageFormat.Png))
System\Drawing\ToolboxBitmapAttribute.cs (1)
297if (img.RawFormat.Guid == ImageFormat.Icon.Guid)
System.Drawing.Common.Tests (149)
mono\System.Drawing.Imaging\BmpCodecTests.cs (1)
440bmp.Save(sOutFile, ImageFormat.Bmp);
mono\System.Drawing.Imaging\GifCodecTests.cs (1)
194bmp.Save(sOutFile, ImageFormat.Gif);
mono\System.Drawing.Imaging\IconCodecTests.cs (10)
43Assert.True(image.RawFormat.Equals(ImageFormat.Icon)); 49Assert.True(bmp.RawFormat.Equals(ImageFormat.MemoryBmp)); 72Assert.True(bmp.RawFormat.Equals(ImageFormat.Icon)); 221Assert.True(bmp.RawFormat.Equals(ImageFormat.Icon)); 426Assert.True(bmp.RawFormat.Equals(ImageFormat.Icon)); 648Assert.True(bmp.RawFormat.Equals(ImageFormat.Icon)); 906Assert.True(bmp.RawFormat.Equals(ImageFormat.Icon)); 1839Assert.True(bmp.RawFormat.Equals(ImageFormat.Icon)); 1880bmp.Save(sOutFile, ImageFormat.Icon); 1884Assert.Equal(ImageFormat.Png, bmpLoad.RawFormat);
mono\System.Drawing.Imaging\JpegCodecTests.cs (1)
359bmp.Save(sOutFile, ImageFormat.Jpeg);
mono\System.Drawing.Imaging\PngCodecTests.cs (1)
580bmp.Save(sOutFile, ImageFormat.Png);
mono\System.Drawing.Imaging\TiffCodecTests.cs (1)
251bmp.Save(sOutFile, ImageFormat.Tiff);
mono\System.Drawing\BitmapTests.cs (8)
774Assert.Equal(ImageFormat.MemoryBmp, bmp.RawFormat); 788Assert.Equal(ImageFormat.Png, other.RawFormat); 1182Assert.Equal(b.RawFormat, ImageFormat.MemoryBmp); 1270Assert.Equal(bitmap.RawFormat, ImageFormat.Bmp); 1281Assert.Equal(image.RawFormat, ImageFormat.MemoryBmp); 1296Assert.Equal(bitmap.RawFormat, ImageFormat.Bmp); 1308Assert.Equal(image.RawFormat, ImageFormat.MemoryBmp); 1317Assert.Equal(image2.RawFormat, ImageFormat.MemoryBmp);
System\Drawing\BitmapTests.cs (24)
36yield return new object[] { "16x16_one_entry_4bit.ico", 16, 16, PixelFormat.Format32bppArgb, ImageFormat.Icon }; 37yield return new object[] { "bitmap_173x183_indexed_8bit.bmp", 173, 183, PixelFormat.Format8bppIndexed, ImageFormat.Bmp }; 38yield return new object[] { "16x16_nonindexed_24bit.png", 16, 16, PixelFormat.Format24bppRgb, ImageFormat.Png }; 43public void Ctor_FilePath(string filename, int width, int height, PixelFormat pixelFormat, ImageFormat rawFormat) 54public void Ctor_FilePath_UseIcm(string filename, int width, int height, PixelFormat pixelFormat, ImageFormat rawFormat) 91Assert.Equal(ImageFormat.Bmp, bitmap.RawFormat); 118public void Ctor_Stream(string filename, int width, int height, PixelFormat pixelFormat, ImageFormat rawFormat) 130public void Ctor_Stream_UseIcm(string filename, int width, int height, PixelFormat pixelFormat, ImageFormat rawFormat) 168Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 192Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 211Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 291Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 308Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 325Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 336Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 607Assert.Equal(ImageFormat.MemoryBmp, result.RawFormat); 620Assert.Equal(ImageFormat.MemoryBmp, result.RawFormat); 629Assert.Equal(ImageFormat.MemoryBmp, result.RawFormat); 704Assert.Equal(ImageFormat.MemoryBmp, result.RawFormat); 742bitmapFromWmf.Save(output, ImageFormat.Png); 1569bitmap.Save(path, ImageFormat.Png); 1577Assert.Equal(ImageFormat.Png, bitmap.RawFormat); 1591bitmap.Save(restrictiveStream, ImageFormat.Png); 1600Assert.Equal(ImageFormat.Png, bitmap.RawFormat);
System\Drawing\IconTests.cs (3)
530Assert.Equal(ImageFormat.MemoryBmp, bitmap.RawFormat); 568Assert.Equal(ImageFormat.Png, bitmap.RawFormat); 619bitmap.Save(stream, ImageFormat.Png);
System\Drawing\ImageAnimator.ManualTests.cs (1)
60animation.Save(Path.Join(testOutputFolder, $"{++frameIndexes[imageName]}_{timestamp}.jpg"), ImageFormat.Jpeg);
System\Drawing\ImageFormatConverterTests.cs (32)
12private readonly ImageFormat _imageFmt; 19_imageFmt = ImageFormat.Bmp; 31Assert.False(_imgFmtConv.CanConvertFrom(null, typeof(ImageFormat)), "ImageFormat"); 38Assert.False(_imgFmtConvFrmTD.CanConvertFrom(null, typeof(ImageFormat)), "TD ImageFormat"); 49Assert.False(_imgFmtConv.CanConvertTo(null, typeof(ImageFormat)), "ImageFormat"); 56Assert.False(_imgFmtConvFrmTD.CanConvertTo(null, typeof(ImageFormat)), "TD ImageFormat"); 65Assert.Equal(_imageFmt, (ImageFormat)_imgFmtConv.ConvertFrom(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.ToString())); 66Assert.Equal(_imageFmt, (ImageFormat)_imgFmtConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.ToString())); 72Assert.Throws<NotSupportedException>(() => _imgFmtConv.ConvertFrom(null, CultureInfo.InvariantCulture, ImageFormat.Bmp)); 73Assert.Throws<NotSupportedException>(() => _imgFmtConv.ConvertFrom(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.Guid)); 77Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, ImageFormat.Bmp)); 78Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, ImageFormat.Bmp.Guid)); 83private ImageFormat ConvertFromName(string imgFormatName) 85return (ImageFormat)_imgFmtConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, imgFormatName); 91Assert.Equal(ImageFormat.Bmp, ConvertFromName("Bmp")); 92Assert.Equal(ImageFormat.Emf, ConvertFromName("Emf")); 93Assert.Equal(ImageFormat.Exif, ConvertFromName("Exif")); 94Assert.Equal(ImageFormat.Gif, ConvertFromName("Gif")); 95Assert.Equal(ImageFormat.Tiff, ConvertFromName("Tiff")); 96Assert.Equal(ImageFormat.Png, ConvertFromName("Png")); 97Assert.Equal(ImageFormat.MemoryBmp, ConvertFromName("MemoryBmp")); 98Assert.Equal(ImageFormat.Icon, ConvertFromName("Icon")); 99Assert.Equal(ImageFormat.Jpeg, ConvertFromName("Jpeg")); 100Assert.Equal(ImageFormat.Wmf, ConvertFromName("Wmf")); 102Assert.Equal(ImageFormat.Heif, ConvertFromName("Heif")); 103Assert.Equal(ImageFormat.Webp, ConvertFromName("Webp")); 111ImageFormat imageformat = ConvertFromName($"[ImageFormat: {testGuid}]"); 146Assert.Throws<NotSupportedException>(() => _imgFmtConv.ConvertTo(null, CultureInfo.InvariantCulture, _imageFmt, typeof(ImageFormat))); 151Assert.Throws<NotSupportedException>(() => _imgFmtConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _imageFmt, typeof(ImageFormat))); 181foreach (ImageFormat iformat in values)
System\Drawing\ImageTests.cs (3)
614ImageFormat.Tiff, 629ImageFormat.Jpeg, 644public void GetEncoderParameterList_ReturnsExpected(ImageFormat format, Guid[] expectedParameters)
System\Drawing\Imaging\ImageCodecInfoTests.cs (11)
72private void CheckDecoderAndEncoder(string clsid, ImageFormat format, string CodecName, string DllName, 90private static void CheckImageCodecInfo(ImageFormat format, string CodecName, string DllName, string FilenameExtension, ImageCodecFlags Flags, string FormatDescription, string MimeType, int signatureLength, string mask, string pattern, string pattern2, ImageCodecInfo codecInfo) 122WMF_CSID, ImageFormat.Wmf, 130EMF_CSID, ImageFormat.Emf, 139ICO_CSID, ImageFormat.Icon, 147TIF_CSID, ImageFormat.Tiff, 155PNG_CSID, ImageFormat.Png, 163JPG_JPEG_JPE_JFIF_CSID, ImageFormat.Jpeg, 171GIF_CSID, ImageFormat.Gif, 179BMP_DIB_RLE_CSID, ImageFormat.Bmp, 226public void CheckDecoderAndEncoder_ReturnsExpected(string clsid, ImageFormat format, string codecName, string dllName,
System\Drawing\Imaging\ImageFormatTests.cs (40)
8private static ImageFormat BmpImageFormat { get; } = new(new Guid("b96b3cab-0728-11d3-9d7b-0000f81ef32e")); 9private static ImageFormat EmfImageFormat { get; } = new(new Guid("b96b3cac-0728-11d3-9d7b-0000f81ef32e")); 10private static ImageFormat ExifImageFormat { get; } = new(new Guid("b96b3cb2-0728-11d3-9d7b-0000f81ef32e")); 11private static ImageFormat GifImageFormat { get; } = new(new Guid("b96b3cb0-0728-11d3-9d7b-0000f81ef32e")); 12private static ImageFormat TiffImageFormat { get; } = new(new Guid("b96b3cb1-0728-11d3-9d7b-0000f81ef32e")); 13private static ImageFormat PngImageFormat { get; } = new(new Guid("b96b3caf-0728-11d3-9d7b-0000f81ef32e")); 14private static ImageFormat MemoryBmpImageFormat { get; } = new(new Guid("b96b3caa-0728-11d3-9d7b-0000f81ef32e")); 15private static ImageFormat IconImageFormat { get; } = new(new Guid("b96b3cb5-0728-11d3-9d7b-0000f81ef32e")); 16private static ImageFormat JpegImageFormat { get; } = new(new Guid("b96b3cae-0728-11d3-9d7b-0000f81ef32e")); 17private static ImageFormat WmfImageFormat { get; } = new(new Guid("b96b3cad-0728-11d3-9d7b-0000f81ef32e")); 18private static ImageFormat HeifImageFormat { get; } = new(new Guid("{b96b3cb6-0728-11d3-9d7b-0000f81ef32e}")); 19private static ImageFormat WebpImageFormat { get; } = new(new Guid("{b96b3cb7-0728-11d3-9d7b-0000f81ef32e}")); 20private static ImageFormat CustomImageFormat { get; } = new(new Guid("48749428-316f-496a-ab30-c819a92b3137")); 26yield return new object[] { BmpImageFormat.Guid, ImageFormat.Bmp }; 27yield return new object[] { EmfImageFormat.Guid, ImageFormat.Emf }; 28yield return new object[] { ExifImageFormat.Guid, ImageFormat.Exif }; 29yield return new object[] { GifImageFormat.Guid, ImageFormat.Gif }; 30yield return new object[] { TiffImageFormat.Guid, ImageFormat.Tiff }; 31yield return new object[] { PngImageFormat.Guid, ImageFormat.Png }; 32yield return new object[] { MemoryBmpImageFormat.Guid, ImageFormat.MemoryBmp }; 33yield return new object[] { IconImageFormat.Guid, ImageFormat.Icon }; 34yield return new object[] { JpegImageFormat.Guid, ImageFormat.Jpeg }; 35yield return new object[] { WmfImageFormat.Guid, ImageFormat.Wmf }; 38yield return new object[] { HeifImageFormat.Guid, ImageFormat.Heif }; 39yield return new object[] { WebpImageFormat.Guid, ImageFormat.Webp }; 50yield return new object[] { "Bmp", ImageFormat.Bmp }; 51yield return new object[] { "Emf", ImageFormat.Emf }; 52yield return new object[] { "Exif", ImageFormat.Exif }; 53yield return new object[] { "Gif", ImageFormat.Gif }; 54yield return new object[] { "Tiff", ImageFormat.Tiff }; 55yield return new object[] { "Png", ImageFormat.Png }; 56yield return new object[] { "MemoryBMP", ImageFormat.MemoryBmp }; 57yield return new object[] { "Icon", ImageFormat.Icon }; 58yield return new object[] { "Jpeg", ImageFormat.Jpeg }; 59yield return new object[] { "Wmf", ImageFormat.Wmf }; 62yield return new object[] { "Heif", ImageFormat.Heif }; 63yield return new object[] { "Webp", ImageFormat.Webp }; 94public void Guid_ReturnsExpected(Guid expectedGuid, ImageFormat imageFormat) 101public void ToString_ReturnsExpected(string expected, ImageFormat imageFormat) 116public void Equals_Object_ReturnsExpected(ImageFormat imageFormat, object obj, bool result)
System\Drawing\Printing\PrinterSettingsTests.cs (12)
374yield return new object[] { ImageFormat.Jpeg }; 375yield return new object[] { ImageFormat.Png }; 380public void IsDirectPrintingSupported_ImageFormatSupported_ReturnsExpected(ImageFormat imageFormat) 388yield return new object[] { ImageFormat.Emf }; 389yield return new object[] { ImageFormat.Exif }; 390yield return new object[] { ImageFormat.Gif }; 391yield return new object[] { ImageFormat.Icon }; 392yield return new object[] { ImageFormat.MemoryBmp }; 393yield return new object[] { ImageFormat.Tiff }; 394yield return new object[] { ImageFormat.Wmf }; 395yield return new object[] { ImageFormat.Bmp }; 400public void IsDirectPrintingSupported_ImageFormatNotSupported_ReturnsExpected(ImageFormat imageFormat)
System.Windows.Forms (6)
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
691if (result.RawFormat.Guid != ImageFormat.Icon.Guid)
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (1)
147if (_owner.UseTransparentColor && bitmap.RawFormat.Guid != ImageFormat.Icon.Guid)
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5126BackgroundImage.Save(_backgroundImageFileName, Drawing.Imaging.ImageFormat.Bmp);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1310if (image.RawFormat.Guid != ImageFormat.Icon.Guid)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
1054if (bmp.RawFormat.Guid != ImageFormat.Icon.Guid && !ImageAnimator.CanAnimate(bmp)) 1091if (currentImage.RawFormat.Guid != ImageFormat.Icon.Guid && !ImageAnimator.CanAnimate(currentImage))
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ImageListImage.cs (1)
44public ImageFormat RawFormat => Image.RawFormat;
System.Windows.Forms.Design.Tests (10)
System\Drawing\Design\BitmapEditorTests.cs (2)
76image.Save(stream, ImageFormat.Bmp); 82result.Save(resultStream, ImageFormat.Bmp);
System\Drawing\Design\ImageEditorTests.cs (2)
133image.Save(stream, ImageFormat.Bmp); 139result.Save(resultStream, ImageFormat.Bmp);
System\Drawing\Design\MetafileEditorTests.cs (1)
60image.Save(stream, ImageFormat.Bmp);
System\Windows\Forms\Design\ImageListImageEditorTests.cs (2)
21image.Save(stream, ImageFormat.Bmp); 30result.Image.Save(resultStream, ImageFormat.Bmp);
System\Windows\Forms\Design\ImageListImageTests.cs (3)
61bitmap.Save(memoryStream, Drawing.Imaging.ImageFormat.Bmp); 69result.Image.RawFormat.Should().Be(expected: Drawing.Imaging.ImageFormat.Bmp); 85result.Image.RawFormat.Should().Be(Drawing.Imaging.ImageFormat.MemoryBmp);
System.Windows.Forms.Tests (1)
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (1)
24bitmap.Save(memoryStream, Drawing.Imaging.ImageFormat.Png);
System.Windows.Forms.UI.IntegrationTests (2)
Infra\ScreenRecordService.cs (1)
411frame.Save(stream, ImageFormat.Png);
Infra\ScreenshotService.cs (1)
36bitmap.Save(fullPath, ImageFormat.Png);
WindowsFormsIntegration (3)
System\Windows\Integration\Convert.cs (3)
147SDI.ImageFormat IntermediateFormat = fromImage.RawFormat; 148if (IntermediateFormat.Guid.CompareTo(SDI.ImageFormat.MemoryBmp.Guid) == 0) 150IntermediateFormat = SDI.ImageFormat.Bmp;