14 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);
98 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.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)
5172BackgroundImage.Save(_backgroundImageFileName, Drawing.Imaging.ImageFormat.Bmp);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1312if (image.RawFormat.Guid != ImageFormat.Icon.Guid)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
1059if (bmp.RawFormat.Guid != ImageFormat.Icon.Guid && !ImageAnimator.CanAnimate(bmp)) 1096if (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;
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;