Simplified Image Processing in GDI+ - Meta File Support in GDI
(Page 2 of 6 )
A meta file, also known as a vector image, is a kind of image which contains a set of drawing instructions and settings. There are two kinds of meta files, i.e. the memory meta file and the disk meta file. The memory meta file is merely stored and manipulated within the memory, mostly to draw or copy images, or share images between processes, while the disk meta file is mostly used to persist the drawn image into a disk and for later replay.
Since a meta file is only a series of drawing instructions, it is not suitable for use under an image process field. On the other hand, the rendering speed of a meta file is much slower than the images of other formats, and it does not adapt to scenarios requiring strict speed. However, a meta file bears the unique advantage of occupying much less disk space than the other formats of images. This is why the meta file is still in use in certain areas.
In GDI+, the following formats of meta file can be rendered:
GDI+ mainly uses EMF to describe a meta file, which is a 32 bit extensible meta file developed by Microsoft with the general aim of overcoming the shortcomings of the WMF file introduced in Windows 3.1. In GDI+, a Metafile class is used to handle a meta file, which can be used to record, render, and persist a meta file. Open MSDN, and you will find more than thirty constructors for the Metafile class. Herein, we are only interested in how to record and replay a metafile.
Next, let us take a close look at a related sample application.
Next: Sample One-Record and Replay Metafiles >>
More Windows Scripting Articles
More By Xianzhong Zhu