The JPEG decoder object provides methods to decompress JPEG image formats. It is presented in the class library for editing and format-conversion purposes.
Note: The UMSJPEGDecoder object is shipped for compatibility with the Ultimedia Services Version 1.1.0 product. The function provided is redundant with the UMSJPEGVideoDecoder object. The UMSJPEGVideoDecoder object is the preferred object for decoding JPEG video, since it inherits methods from the UMSVideoDecoder base video decoder class.
To learn more about the UMSJPEGDecoder object, see:
For introductory information, see Video Codec Objects.
To avoid name collision on defines, integer values have been captured as enumerated lists. The set of valid values from an enumerated lists can vary with the application. The detailed method descriptions describe the valid or possible values for the specific use. The enumerated lists that are defined for this object are:
enum ReturnCode { Success, Failure, UnsupportedFormat, OutOfRange, Uninitialized, WrongImageSize }; enum ImageFormatOut { RGB8Dither, RGB24, Mono8, RGB };
This method accepts an encoded JPEG frame and produces an output image in the format specified.
in char *comp_frame | Pointer to the start of the compressed frame data. |
in char *image_frame | Pointer to the start of the expanded image data. |
This method allows the application to get a copy of the decoder's color map.
This method gets the attributes for the color map used by the decoder to create the image frame.
out long colormap_base_index | The base address of the JPEG color map in the output AIXwindows window color map. |
out long colormap_size | The length of the color map array for each color. |
This function gets the number of components from the compressed frame data. For a color image, the component_number is equal to 3. For a monochrome image, the component_number is equal to 1.
in char *comp_frame | Pointer to the start of the compressed frame data. |
out long component_number | Number of components in the frame. |
This method allows the application to query the output image format.
Any of the ImageFormatOut values are possible.
This method allows the application to query the dimensions of the encoded image frame. If comp_frame is equal to NULL, get_image_size returns the width and height set by set_image_size. In case the width and height are not set by set_image_size, Uninitialized is returned. If comp_frame is not equal to NULL, the width and height extracted from the compressed frame data are returned.
in char *comp_frame | Pointer to the start of the compressed frame data. |
out long width | The width of the image. |
out long height | The height of the image. |
This method sets up attributes of the decoder's internal color map. The default colormap_size is 224 and the default colormap_base_index is 32. Currently, the default values are the only valid settings. This method is only used if the output image format is RGB8Dither.
This method sets the format of the output image data to be created by the decoder. If the format is unsupported, an error code is returned.
in ImageFormatOut image_format | Possible values are RGB8Dither, RGB24, Mono8, and RGB. |
This method allows the application to specify the dimensions of the input decoded frame. The image frame to be created has dimensions that match the original encoded image.
in long width | The width of the image. |
in long height | The height of the image. |
For introductory information, see Video Codec Objects.