» MFRasterizer
High quality rasterization library of Windows metafiles with antialiasing feature.
» MFConverter
Console utility software for Windows metafiles conversion to PNG/JPEG/GIF/TIFF/BMP formats.
» MFImport
Plugin for Photoshop graphic editor that allows opening of Windows metafiles.
РУС ENG

About MFRasterizer Library

Metafile (WMF, EMF) – is the universal format of vector graphic files, that makes an integral part of Windows operation system. That is why Windows API offers a wide set of options for this vector format creation, reading, writing, displaying. It’s a pity but quality of the image displayed (rasterized) with the help of the PlayMetaFile/PlayEnhMetaFile function does not always satisfy independent developers.

The MFRasterizer Library helps to significantly increase quality of your Windows metafiles (WMF, EMF) displayed in your programs. Usage of the smoothing (antialiasing) algorithm while rasterizing vector images, helps to eliminate “steps” at the borders of polygons. The additional feature of MFRasterizer Library is availability of image scale and rotation parameters that allows for example to use Windows vector metafiles (WMF, EMF) for geographical maps systems developing.


Comparison of vector image rasterization First sample of high quality rasterization of Windows metafiles (WMF, EMF) performed by MFRasterizer library
To enlarge screenshot

Comparison of text rasterization Second sample of high quality rasterization of Windows metafiles (WMF, EMF) performed by MFRasterizer library

Files for downloading

File name File size Description
MFRasterizer.zip 56 683 MFRasterizer Library To download MFRasterizer library
MFRasterizer64.zip 57 025 MFRasterizer Library (x64 build) To download MFRasterizer library (x64 build)
MFRTest.zip 88 058 Program allowing to compare vector image rasterization performed by Windows operation system and MFRasterizer Library To download program allowing to compare vector image rasterization performed by Windows operation system and MFRasterizer Library
MFRTest64.zip 89 055 Program allowing to compare vector image rasterization performed by Windows operation system and by MFRasterizer Library (x64 build) To download program allowing to compare vector image rasterization performed by Windows operation system and MFRasterizer Library (x64 build)
MFRSmpCPP.zip 129 973 Example of MFRasterizer Library being used in C++ To download example of MFRasterizer Library being used in C++
MFRSmpCS.zip 98 245 Example of MFRasterizer Library being used in C# To download example of MFRasterizer Library being used in C#
MFRSmpPas.zip 291 158 Example of MFRasterizer Library being used in Delphi To download example of MFRasterizer Library being used in Delphi

Feedback to developer


Subjects
Your e-mail (optional)
Message
Message is sending...

Cost of MFRasterizer Library

MFRasterizer Library for Windows metafiles (WMF, EMF) rasterization is promoted in DEMO version. You can use the DEMO version of MFRasterizer Library for your programs developing but if you are going to use or to sell them you have to acquire the license.


Commercial License
This license allows MFRasterizer Library to be used by a company in one software product
$999 Buy MFRasterizer (commercial license)
Corporate License
This license allows MFRasterizer Library to be used by a company in any software products
$2999 Buy MFRasterizer (corporate license)

How to use MFRasterizer Library

Purpose of MFRasterizerFile function is to provide simple and quality Windows metafiles (WMF, EMF) rasterization in your programs. Input parameters of the function are rasterization parameters and full path to metafile. Returns TRUE if completed successfully.

There are two versions of this function. One is to be used for metafile path in ANSI encoding; the other one is to be used for metafile path in UNICODE.

bool MFRasterizerFile(
   HDC           hDC,
   char*         pcFilename,
   RECT*         pRect,
   unsigned char bTransparency,
   bool          bProp,
   double        dAngle
);

bool MFRasterizerFileW(
   HDC           hDC,
   wchar_t*      pwcFilename,
   RECT*         pRect,
   unsigned char bTransparency,
   bool          bProp,
   double        dAngle
);    
Parameter Description
hDC Handle to the device context of the rasterized metafile being displayed.
pcFilename Path to metafile (ANSI encoding).
pwcFilename Path to metafile (UNICODE encoding).
pRect Pointer to a RECT structure that contains the coordinates of the bounding rectangle used to display the picture.
bTransparency Transparency index (from 0 to 255, 0 – absolutely transparent image).
bProp Proportionality tag. If TRUE is chosen than image is going to be rasterized according to ratio of its’ sizes.
dAngle Radian angle of image rotation.

MFRasterizer function is designed for the most effective usage of Windows metafiles (WMF, EMF) rasterization library. Metafile descriptor is used as an input parameter. It is also possible to set parameters for the image to be enlarged while being rasterized. Returns TRUE if completed successfully.

bool MFRasterizer(
   HDC           hDC,
   HENHMETAFILE  hMetafile,
   RECT*         pRect,
   unsigned char bTransparency,
   double        dAngle,
   double        dX1,
   double        dY1,
   double        dX2,
   double        dY2
);		
Parameter Description
hDC Handle to the device context of the rasterized metafile being displayed.
hMetafile Metafile handle for rasterization.
pRect Pointer to a RECT structure that contains the coordinates of the bounding rectangle used to display the picture.
bTransparency Transparency index (from 0 to 255, 0 – absolutely transparent image).
dAngle Radian angle of image rotation.
dX1 Coordinate of metafile left upper corner for the purpose of rasterization (relative units, from 0 to 1). Used for images scaling.
dY1
dX2 Coordinate of metafile right down corner for the purpose of rasterization (relative units, from 0 to 1). Used for images scaling.
dY2

References

MFRasterizer Library for Windows metafiles (WMF, EMF) rasterization is developed with the help of the graphic library Anti-Grain Geometry (AGG).


Library for Windows metafiles (WMF, EMF) rasterization © 2008 Whole Group. All rights reserved.
With the assistance of the ACCENT Translation Bureau