188.8.131.52 Image encoding
This section explains the image encoding format that needs to be used in the VideoControl.getSnapshot() method.
Currently, MMAPI lets captured image be only PNG or JPEG, without any additional parameters. In implementations that are compliant with 2nd Edition, the following keys will be added as valid keys for image encoding. Keys will be added to the MMAPI specification in the maintenance release.
Integer 0 – 100
Tells the quality of the picture. With JPEG, the quality refers to quality used in IJG JPEG software where better quality means a better picture and larger picture size.
String describing the color format
Tells the color coding of the image. For example, possible values for PNG would be p256, grey, and rgb888.
Tells if the image is encoded in interlaced format.
Tells if the images are encoded in progressive format.
Table 25: Image encoding options
For example, "encoding=png&colors=p256" would result in a 256-color indexed PNG image.
MIME types can be used as encoding formats in addition to the plain format names specified in the MMAPI specification. This is against the MMAPI specification and it will be changed in the maintenance release.
The MMAPI specification does not state very clearly how encoding strings are handled. Their behavior will be clarified in the maintenance release.
Unrecognized keys in encoding strings will be silently ignored.
Unusable or erroneous values in recognized keys will be treated as errors, for example, getSnapshot("encoding=jpeg&quality=50" ) will throw an Exception if a JPEG image with a quality of 50 can't be encoded.
2.7.9 Available encodings
This section lists available encodings, their string representations, and MIME types for decoding. String syntaxes are specified in the MMAPI (JSR-135) Specification [MMAPI] under Manager class in the section Media Locator.