14 instantiations of ImageFormat
System.Drawing.Common (14)
System\Drawing\Image.cs (1)
510
return new
ImageFormat
(guid);
System\Drawing\ImageFormatConverter.cs (1)
43
return new
ImageFormat
(guid);
System\Drawing\Imaging\ImageFormat.cs (12)
17
private static readonly ImageFormat s_memoryBMP =
new
(PInvokeCore.ImageFormatMemoryBMP);
18
private static readonly ImageFormat s_bmp =
new
(PInvokeCore.ImageFormatBMP);
19
private static readonly ImageFormat s_emf =
new
(PInvokeCore.ImageFormatEMF);
20
private static readonly ImageFormat s_wmf =
new
(PInvokeCore.ImageFormatWMF);
21
private static readonly ImageFormat s_jpeg =
new
(PInvokeCore.ImageFormatJPEG);
22
private static readonly ImageFormat s_png =
new
(PInvokeCore.ImageFormatPNG);
23
private static readonly ImageFormat s_gif =
new
(PInvokeCore.ImageFormatGIF);
24
private static readonly ImageFormat s_tiff =
new
(PInvokeCore.ImageFormatTIFF);
25
private static readonly ImageFormat s_exif =
new
(PInvokeCore.ImageFormatEXIF);
26
private static readonly ImageFormat s_icon =
new
(PInvokeCore.ImageFormatIcon);
27
private static readonly ImageFormat s_heif =
new
(PInvokeCore.ImageFormatHEIF);
28
private static readonly ImageFormat s_webp =
new
(PInvokeCore.ImageFormatWEBP);
98 references to ImageFormat
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
92
metafile.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)
231
if (RawFormat.Guid ==
ImageFormat
.Icon.Guid)
System\Drawing\Graphics.cs (1)
2645
if (errorStatus != Status.Ok && image.RawFormat.Equals(
ImageFormat
.Emf))
System\Drawing\Image.cs (4)
226
public void Save(string filename,
ImageFormat
format)
293
public void Save(Stream stream,
ImageFormat
format)
503
public
ImageFormat
RawFormat
872
if (!image.RawFormat.Equals(
ImageFormat
.Gif))
System\Drawing\ImageFormatConverter.cs (39)
48
return
ImageFormat
.Bmp;
50
return
ImageFormat
.Emf;
52
return
ImageFormat
.Exif;
54
return
ImageFormat
.Gif;
56
return
ImageFormat
.Icon;
58
return
ImageFormat
.Jpeg;
60
return
ImageFormat
.MemoryBmp;
62
return
ImageFormat
.Png;
64
return
ImageFormat
.Tiff;
66
return
ImageFormat
.Wmf;
68
return
ImageFormat
.Heif;
70
return
ImageFormat
.Webp;
72
throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, strFormat, nameof(
ImageFormat
)));
77
if (value is
ImageFormat
imgFormat)
87
if (imgFormat.Guid.Equals(
ImageFormat
.Bmp.Guid))
89
else if (imgFormat.Guid.Equals(
ImageFormat
.Emf.Guid))
91
else if (imgFormat.Guid.Equals(
ImageFormat
.Exif.Guid))
93
else if (imgFormat.Guid.Equals(
ImageFormat
.Gif.Guid))
95
else if (imgFormat.Guid.Equals(
ImageFormat
.Icon.Guid))
97
else if (imgFormat.Guid.Equals(
ImageFormat
.Jpeg.Guid))
99
else if (imgFormat.Guid.Equals(
ImageFormat
.MemoryBmp.Guid))
101
else if (imgFormat.Guid.Equals(
ImageFormat
.Png.Guid))
103
else if (imgFormat.Guid.Equals(
ImageFormat
.Tiff.Guid))
105
else if (imgFormat.Guid.Equals(
ImageFormat
.Wmf.Guid))
110
return new InstanceDescriptor(typeof(
ImageFormat
).GetProperty(strFormat), null);
114
ConstructorInfo? ctor = typeof(
ImageFormat
).GetConstructor([typeof(Guid)]);
125
return new StandardValuesCollection(new
ImageFormat
[]
127
ImageFormat
.MemoryBmp,
128
ImageFormat
.Bmp,
129
ImageFormat
.Emf,
130
ImageFormat
.Wmf,
131
ImageFormat
.Gif,
132
ImageFormat
.Jpeg,
133
ImageFormat
.Png,
134
ImageFormat
.Tiff,
135
ImageFormat
.Exif,
136
ImageFormat
.Icon,
137
ImageFormat
.Heif,
138
ImageFormat
.Webp
System\Drawing\Imaging\ImageFormat.cs (30)
17
private static readonly
ImageFormat
s_memoryBMP = new(PInvokeCore.ImageFormatMemoryBMP);
18
private static readonly
ImageFormat
s_bmp = new(PInvokeCore.ImageFormatBMP);
19
private static readonly
ImageFormat
s_emf = new(PInvokeCore.ImageFormatEMF);
20
private static readonly
ImageFormat
s_wmf = new(PInvokeCore.ImageFormatWMF);
21
private static readonly
ImageFormat
s_jpeg = new(PInvokeCore.ImageFormatJPEG);
22
private static readonly
ImageFormat
s_png = new(PInvokeCore.ImageFormatPNG);
23
private static readonly
ImageFormat
s_gif = new(PInvokeCore.ImageFormatGIF);
24
private static readonly
ImageFormat
s_tiff = new(PInvokeCore.ImageFormatTIFF);
25
private static readonly
ImageFormat
s_exif = new(PInvokeCore.ImageFormatEXIF);
26
private static readonly
ImageFormat
s_icon = new(PInvokeCore.ImageFormatIcon);
27
private static readonly
ImageFormat
s_heif = new(PInvokeCore.ImageFormatHEIF);
28
private 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
'/>.
45
public static
ImageFormat
MemoryBmp => s_memoryBMP;
50
public static
ImageFormat
Bmp => s_bmp;
55
public static
ImageFormat
Emf => s_emf;
60
public static
ImageFormat
Wmf => s_wmf;
65
public static
ImageFormat
Gif => s_gif;
70
public static
ImageFormat
Jpeg => s_jpeg;
75
public static
ImageFormat
Png => s_png;
80
public static
ImageFormat
Tiff => s_tiff;
85
public static
ImageFormat
Exif => s_exif;
90
public static
ImageFormat
Icon => s_icon;
99
public static
ImageFormat
Heif => s_heif;
108
public 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
'/>.
114
public 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)
330
public bool IsDirectPrintingSupported(
ImageFormat
imageFormat)
332
if (!imageFormat.Equals(
ImageFormat
.Jpeg) && !imageFormat.Equals(
ImageFormat
.Png))
341
private static bool IsDirectPrintingSupported(HDC hdc,
ImageFormat
imageFormat, out int escapeFunction)
343
Debug.Assert(imageFormat ==
ImageFormat
.Jpeg || imageFormat ==
ImageFormat
.Png);
345
escapeFunction = imageFormat.Equals(
ImageFormat
.Jpeg)
372
ImageFormat
imageFormat = image.RawFormat;
374
if (!imageFormat.Equals(
ImageFormat
.Jpeg) && !imageFormat.Equals(
ImageFormat
.Png))
System\Drawing\ToolboxBitmapAttribute.cs (1)
297
if (img.RawFormat.Guid ==
ImageFormat
.Icon.Guid)
System.Windows.Forms (6)
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
691
if (result.RawFormat.Guid !=
ImageFormat
.Icon.Guid)
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (1)
147
if (_owner.UseTransparentColor && bitmap.RawFormat.Guid !=
ImageFormat
.Icon.Guid)
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5172
BackgroundImage.Save(_backgroundImageFileName, Drawing.Imaging.
ImageFormat
.Bmp);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1312
if (image.RawFormat.Guid !=
ImageFormat
.Icon.Guid)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
1059
if (bmp.RawFormat.Guid !=
ImageFormat
.Icon.Guid && !ImageAnimator.CanAnimate(bmp))
1096
if (currentImage.RawFormat.Guid !=
ImageFormat
.Icon.Guid && !ImageAnimator.CanAnimate(currentImage))
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ImageListImage.cs (1)
44
public
ImageFormat
RawFormat => Image.RawFormat;
WindowsFormsIntegration (3)
System\Windows\Integration\Convert.cs (3)
147
SDI.
ImageFormat
IntermediateFormat = fromImage.RawFormat;
148
if (IntermediateFormat.Guid.CompareTo(SDI.
ImageFormat
.MemoryBmp.Guid) == 0)
150
IntermediateFormat = SDI.
ImageFormat
.Bmp;