clDecompressImage man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



clCompressImage(3dm)					  clCompressImage(3dm)

NAME
     clCompressImage, clDecompressImage - Compress/Decompress a single image

SYNOPSIS
     #include <dmedia/cl.h>

     int clCompressImage(int scheme, int width, int height,
	 int format, float compressionRatio, void *frameBuffer,
	 int *compressedBufferSizePtr, void *compressedBuffer)
     int clDecompressImage(int scheme, int width, int height,
	 int format, int compressedBufferSize,
	 void *compressedBuffer, void *frameBuffer)

ARGUMENTS
     scheme    The compression/decompression scheme to use.

     width     The width of the image.

     height    The height of the image.

     format    The format of the original image to (de)compress :
	       CL_FORMAT_BGR, CL_FORMAT_XBGR, CL_FORMAT_ABGR,
	       CL_FORMAT_BGR332, CL_FORMAT_GRAYSCALE, CL_FORMAT_YCbCr,
	       CL_FORMAT_YCbCr422, or CL_FORMAT_YCbCr422DC.

     compressionRatio
	       The target compression ratio. The actual compression ratio
	       depends on this value and the particular codec.	A value of 0.0
	       indicates the default should be used.

     frameBuffer
	       A pointer to the frame buffer.

     compressedBufferSizePtr
	       A pointer to the size of the compressed data buffer in bytes.
	       The value pointed to is overwritten by clCompressImage to
	       return the actual size of the compressed data.

     compressedBufferSize
	       The size of the compressed data in bytes.

     compressedBuffer
	       A pointer to the compressed data buffer.

DESCRIPTION
     clCompressImage compresses the image in frameBuffer and stores the result
     in compressedBuffer and the resulting size in compressedBufferSizePtr.

     clDecompressImage decompresses the data in compressedBuffer of size
     compressedBufferSize and stores the resulting image in frameBuffer.

     The values of the state parameters used with the other compression

									Page 1

clCompressImage(3dm)					  clCompressImage(3dm)

     library calls have no effect on these routines, however their default
     values do. width, height, format, and compressionRatio are interpreted in
     the same manner as the corresponding state parameters, but are given as
     direct parameters so that they may be specified in the same call.

RETURNS
     Each function returns SUCCESS, or a negative error code on failure.

EXAMPLE
	  /* Compress and decompress a 320 by 240 XBGR image with JPEG */
	  int frameIndex, compressedBufferSize, maxCompressedBufferSize;
	  int *compressedBuffer, frameBuffer[320][240];

	  /* malloc a big enough buffer */
	  maxCompressedBufferSize = 320 * 240 * CL_BytesPerPixel(CL_FORMAT_XBGR)
				    + clQueryMaxHeaderSize(CL_JPEG_SOFTWARE);
	  compressedBuffer = (int *)malloc(maxCompressedBufferSize);

	  /* Compress and decompress it */
	  clCompressImage(CL_JPEG_SOFTWARE, 320, 240, CL_FORMAT_XBGR, 15.0,
	      frameBuffer, &compressedBufferSize, compressedBuffer);
	  clDecompressImage(CL_JPEG_SOFTWARE, 320, 240, CL_FORMAT_XBGR,
	      compressedBufferSize, compressedBuffer, frameBuffer);

SEE ALSO
     CLintro(3dm)

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net