Table of Contents


MAGscrModeIsDigital - returns digital flag of MAG file


#include <maglo.h>
int MAGscrModeIsDigital(MagImage *mag);


The MAGscrModeIsDigital() function returns true if the MAG file that mag is associated to is saved in digital screen mode.

In digital mode, intensity of each color component(R, G, B) of actual color to which each palette index maps is max(255) or minimum(0).

A MAG decoder can safely ignore this flag because all the palettes mappings are defined as specified in digital mode too. This flag is used on hardware that have capability to display only 8 or 16 colors to avoid calculating color approximation, which is meaningless on digital images.

Return Values

  1. The image is saved in analog mode.
  2. The image is saved in digital mode.

See Also

MAGpalette(3) , MAGscrModeCode(3) , libmaglo(7)

Table of Contents