be represented by a VGshort is given by (– VG_MAXSHORT – 1), or -32,768.
VG_MAXINT
The macro VG_MAXINT contains the largest positive value that may be represented by a VGint. VG_MAXINT
is defined to be equal to 2
31
– 1, or 2,147,483,647. The smallest negative value that may be represented
by a VGint is given by ( –VG_MAXINT – 1), or -2,147,483,648.
VG_MAX_FLOAT
The parameter VG_MAX_FLOAT contains the largest floating-point number that will be accepted by an
implementation. To query the parameter, use the vgGetf function with a paramType argument of
VG_MAX_FLOAT (see Section 5.2). All implementations must define VG_MAX_FLOAT to be at least 10
10
.
3.4 Colors
Colors in OpenVG Lite other than those stored in image pixels (e.g., colors for clearing, painting, and
edge extension for convolution) are represented as non-premultiplied (see Section 3.4.3) sRGBA
[sRGB99] color values. Image pixels may be defined in a number of color spaces, including sRGB, linear
RGB, linear grayscale (or luminance) and nonlinearly coded, perceptually-uniform grayscale, in
premultiplied or non-premultiplied form. Color and alpha values lie in the range [0,1] unless otherwise
noted. This applies to intermediate values in the pixel pipeline as well as to application-specified values. If
an alpha channel is present but has a bit depth of zero, the alpha value of each pixel is taken to be 1.
Non-linear quantities are denoted using primed (’) symbols below. [POYN03] contains an excellent
discussion of the use of non-linear coding to achieve perceptual uniformity.
3.4.1 Linear and Non-Linear Color Representations
OpenVG Lite use linear RGBA color in processing. Therefore, if user want display rendering result with
sRGB format, user should add conversion process for input or output color data in his application. It may
be executed in OpenVG Lite or EGL. In a linear color representation, the numeric values associated with
a color channelvalue measure the rate at which light is emitted by an object, multiplied by someconstant
scale factor. Informally, it can be thought of as counting the number of photonsemitted in a given amount
of time. Linear representations are useful for computation,since light values may be added together in a
physically meaningful way.
However, the human visual system responds non-linearly to the light power ("intensity") of an image.
Accordingly, many common image coding standards (e.g., the EXIF JPEG format used by many digital
still cameras and the MPEG format used for video) utilize non-linear relationships between light power
and code values. This allows a larger number of distinguishable colors to be represented in a given
number of bits than is possible with a linear encoding. Common display devices such as CRTs and LCDs
also emit light whose power at each pixel component is proportional to a non-linear power function (i.e., a
function of the form xa where a is constant) of the applied code value, whether due to the properties of
analog CRT electronics or to the deliberate application of a non-linear transfer function elsewhere in the
评论0