Index of OpenRM - RMI Library

 RMenum  rmiWriteJPEG(const char *filename,
                      int quality,
                      const RMimage *toWrite)
 const char *filename - the name of the file to be written.
 int quality - integer value that controls degree of lossiness in
 JPEG file. The value of quality ranges from 0-100, with 100 being
 the least amount of loss, and smaller numbers producing increasing
 amounts of error. Smaller numbers result in smaller output file size.
 const RMimage *toWrite - the RMimage object that will be written
 to the file in JPEG format.

Writes a JPEG image raster file named "filename" using the input RMimage object "toWrite" as the source. The quality of the JPEG file is determined by the "quality" parameter, which ranges from 0-100. Smaller quality values produce greater amounts of compression, smaller files and poorer image image quality. Larger quality values produce larger files, less compression, and better image quality.

Returns RM_CHILL upon success, or RM_WHACKED upon failure.

This routine works only on RMimage objects that contain RGB images.

librmi library source file: rmjpeg.c

 RMimage *rmiReadJPEG (const char * filename)
 const char * filename - a character string, the name of the file
 containing a JPEG image to read (input).

This routine will open and read a JPEG image file. If there are no errors, this routine will create and return to the caller an RMimage object containing the raster image data. If there is a problem reading the JPEG file, NULL is returned.

librmi library source file: rmjpeg.c