The Pixspan Memory Compression Library is designed to be incorporated into software products that handle full-resolution images and that can benefit in transmission or storage by temporarily transforming that image into a compressed version. This library operates in the memory-buffer to memory-buffer realm, and therefore any file management must be done by the calling software.
The Library supports the following formats:
  • DPX
  • Cineon
  • OpenEXR
  • TIFF
  • ARRIRaw
  • Canon c500 Raw
The operation of the library is to take as input a buffer containing the contents of a full-resolution image file, and then outputting the compressed version of that image to another buffer, assuming that the file format is supported. The library also performs the reverse transformation, taking a Pixspan-compressed version of that image from an input buffer, and decompressing to an output buffer. For file formats that are not supported, the library leaves the input buffer undisturbed, and outputs an appropriate status code to indicate that no compression/decompression was performed. The calling software is responsible for freeing both the input buffer and the output buffer, if an output buffer was created.
The performance of the software is approximately 10 MBytes/second for a single thread on an Intel E5-2670 or equivalent processor. So, a 12 MByte DPX file will take 1.2 seconds to compress or decompress with one thread. The library can be multi-threaded so that the performance can scale to the platform where it resides (e.g. a 16 core Intel E5-2670 can process approximately 320 MBytes/second based on the size of original images).
Files in the Library Package
The package supporting the Apple Mac and Linux includes the following files:
  • The dynamic library implementing Pixspan compression/decompression for Mac (.dylib)
  • The dynamic library implementing Pixspan compression/decompression for Linuxi (.so file)
  • pixspan_memory.h – The API for the library
  • pixspan_in_memory_test – a test application built with the library (note that this includes a license key that will time out)
  • in_memory_test.c – a C program that demonstrates how to use the library.
  • A Pixspan License File will be required, sent separately
The Library API

The main function in the library is: pixspan_process(). This takes the parameters of:

  • Mode - Compress, Decompress, or Auto
  • License String - A Pixspan-supplied License String
  • Input Buffer Pointer - A pointer to the Image Frame
  • Input Buffer Size - The size of the Image Frame
  • Process Information - Pointer to a Structure that holds information about the Processed Frame, including a pointer to the Compressed/Decompressed Output Buffer and its size.
The function returns a status code that can include the following values:
  • PIXSPAN_STATUS_SUCCESS – compress or decompress successful
  • PIXSPAN_STATUS_NOT_SUPPORTED – image type not supported
  • PIXSPAN_STATUS_SUPPORTED_FAILED – type supported, but compress/decompress unsuccessful
  • PIXSPAN_STATUS_ALREADY_COMPRESSED – content was already compressed for a compress operation
  • PIXSPAN_STATUS_ALREADY_DECOMPRESSED – content was uncompressed for a decompress operation
  • PIXSPAN_STATUS_INPUT_BUFFER_ERROR – unknown error with the input buffer
  • PIXSPAN_STATUS_OUTPUT_BUFFER_OPEN_ERROR – unknown error with the output buffer
  • PIXSPAN_STATUS_LICENSE_EXPIRED – Pixspan license key expired or invalid
A Sample Application is provided in the package that allows a Command-Line Application to be built. This Application operates on one file at a time, and can be used to compare against the User application that is built with the Library.
Alexa 65 Support
Transmission Solutions
Securing Your Images