Class MetafileFormat
WMF, EMF and EMF+ (and WMZ, EMZ) as an Egami format: registered with
WithFormat(FormatInfo), Raster.Load draws a metafile at its own size at 96 DPI (or
Dpi) onto a transparent Rgba8 raster, and Raster.Probe gives that
size from the header without drawing. Text uses the installed fonts. For your own fonts, a target size, a background or the
GDI part of a dual file, load a Metafile and call Rasterize<TPixel>(MetafileRenderOptions?).
public static class MetafileFormat
- Inheritance
-
MetafileFormat
- Inherited Members
Examples
// Register the format once; Raster.Load then draws metafiles at their own size at 96 DPI.
EgamiContext context = EgamiContext.Default.WithFormat(MetafileFormat.Info);
using Raster raster = Raster.Load(path, context);
RasterInfo info = Raster.Probe(path, context); // the size from the header, nothing drawn
// MetafileDecodeOptions sets the resolution; Raster.Load then draws at that DPI.
using Raster sharp = Raster.Load(path, context, new MetafileDecodeOptions { Dpi = 300 });
Properties
Info
Gets the metafile format: detected by the placeable WMF key, a META_HEADER, an EMF header, or gzip data whose start is one of them.
public static FormatInfo Info { get; }