|
|
Polish version of this page |
Description of ZMG File FormatApart from reading so many image file formats, MGA View can also save files in its own native format called zmg. By now it has no capability to do the opposite, i.e. convert zmg files to formats other than tga, but this function will be added in future.The structure of zmg file depends immediately on the way MGA View processes the image data to display it on the screen. The mga_vid driver uses data stored as YUV instead of RGB. YUV is a combination of three terms: Y, U and V. Y occupies 1 byte per pixel and stores the outline of an image, whereas U and V occupy 1 byte per 4 pixels (2x2 pixels area) each and they stand for the intensity of red and blue respectively. If U and V both equal -128, the image is black and white (so we can say Y is grayscale whereas U and V store the colours of an image). More information about YUV can be found in here. To display the image, MGA View has to convert the data from RGB to YUV. Only in this form the data can be sent into the graphics card memory. ZMG stores image data as YUV, so file in this format is read faster than others for no prior conversion is needed. Below you can find a thorough description of a file in ZMG format:
File header: "zMG"
File width - 2 bytes
V 1
Version 2
Version 3
Version 4 So the whole file looks like that: description number of bytes HEADER 3 VERSION 1 IMAGE X 2 IMAGE Y 2 for version 1: term Y IMAGE X * IMAGE Y term U (IMAGE X * IMAGE Y)/4 term V (IMAGE X * IMAGE Y)/4 Version 2: Y length 3 Y term Y length U length 3 U term U length V length 3 V term V length Version 3: Y term IMAGE X * IMAGE Y Version 4: Y length 3 Y term Y length |
Last update: Wed, 16 October 2002 |
MGA View 2002 by HelDoRe <tehace@konto.pl> Web design by Nauthiz <nauthiz@wp.pl> | |