Class Metafile

Metafile class

Defines a graphic metafile. A metafile contains records that describe a sequence of graphics operations that can be recorded (constructed) and played back (displayed). This class is not inheritable.

public sealed class Metafile : Image

Constructors

NameDescription
Metafile(Stream)Initializes a new instance of the Metafile class from the specified data stream.
Metafile(string)Initializes a new instance of the Metafile class from the specified file name.
Metafile(IntPtr, bool)Initializes a new instance of the Metafile class from the specified handle.
Metafile(IntPtr, EmfType)Initializes a new instance of the Metafile class from the specified handle to a device context and an EmfType enumeration that specifies the format of the Metafile.
Metafile(Stream, IntPtr)Initializes a new instance of the Metafile class from the specified data stream and a Windows handle to a device context. />.
Metafile(string, IntPtr)Initializes a new instance of the Metafile class from the specified file name.
Metafile(Stream, IntPtr, EmfType)Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile.
Metafile(Stream, IntPtr, RectangleF, MetafileFrameUnit, EmfType)Initializes a new instance of the Metafile class from the specified data stream, a Windows handle to a device context, and an EmfType enumeration that specifies the format of the Metafile.

Properties

NameDescription
Flags { get; }Gets the integer representing a bitwise combination of ImageFlags for this Image.
override FrameDimensionsList { get; }Gets an array of GUIDs that represent the dimensions of frames within this Image.
override Height { get; }Gets the height, in pixels, of this Metafile.
HorizontalResolution { get; }Gets the horizontal resolution, in pixels per inch, of this Image.
override Palette { get; set; }Gets or sets the color palette used for this Image.
PhysicalDimension { get; }Gets the width and height of this image.
override PixelFormat { get; }Gets the pixel format for this Image.
override PropertyIdList { get; }Gets IDs of the property items stored in this Image.
override PropertyItems { get; }Gets all the property items (pieces of metadata) stored in this Image.
override RawFormat { get; }Gets the file format of this Image.
Size { get; }Gets the width and height, in pixels, of this image.
Tag { get; set; }Gets or sets an object that provides additional data about the image.
VerticalResolution { get; }Gets the vertical resolution, in pixels per inch, of this Image.
override Width { get; }Gets the width, in pixels, of this Metafile.

Methods

NameDescription
Clone()Creates an exact copy of this Image.
virtual Dispose()Releases all resources used by this Image.
GetBounds(ref GraphicsUnit)Gets the bounds of the image in the specified unit.
GetFrameCount(FrameDimension)Returns the number of frames of the specified dimension.
GetHenhmetafile()Returns a Windows handle to an enhanced Metafile.
GetMetafileHeader()Returns the MetafileHeader associated with this Metafile.
override GetPropertyItem(int)Gets the specified property item from this Image.
GetThumbnailImage(int, int, GetThumbnailImageAbort, IntPtr)Returns a thumbnail for this Image.
PlayRecord(EmfPlusRecordType, int, int, byte[])Plays an individual metafile record.
override RemovePropertyItem(int)Removes the specified property item from this Image.
override RotateFlip(RotateFlipType)This method rotates, flips, or rotates and flips the Image.
Save(string)Saves this Image to the specified file or stream.
Save(Stream, ImageFormat)Saves this image to the specified stream in the specified format.
Save(string, ImageFormat)Saves this Image to the specified file in the specified format.
Save(Stream, ImageCodecInfo, EncoderParameters)Saves this image to the specified stream, with the specified encoder and image encoder parameters.
Save(string, ImageCodecInfo, EncoderParameters)Saves this Image to the specified file, with the specified encoder and image-encoder parameters.
SaveAdd(EncoderParameters)Adds a frame to the file or stream specified in a previous call to the one of Image.Save(…) methods. Use this method to save selected frames from a multiple-frame image to another multiple-frame image.
SaveAdd(Image, EncoderParameters)Adds a frame to the file or stream specified in a previous call to the one of Image.Save(…) methods.
SelectActiveFrame(FrameDimension, int)Selects the frame specified by the dimension and index.
override SetPropertyItem(PropertyItem)Stores a property item (piece of metadata) in this Image.
static GetMetafileHeader(Stream)Returns the MetafileHeader associated with the specified Metafile.
static GetMetafileHeader(string)Returns the MetafileHeader associated with the specified Metafile.

See Also