CAN/CSA ISO/IEC 12089-01:1995 – Image Processing and Interchange (IPI) Application Program Interface (API) Language Bindings for C

Ensuring Interoperability in Image Processing Software through Standardized C Language Bindings

Scope and Introduction

The standard CAN/CSA ISO/IEC 12089-01:1995 (also referenced as IEC 12089-01) is the Canadian adoption of the international ISO/IEC 12089-1 standard, which defines the C language bindings for the Image Processing and Interchange (IPI) Application Program Interface (API). As part of the IPI family of standards (ISO/IEC 12087 and ISO/IEC 12088), this document specifies a set of function calls, data types, and error-handling mechanisms that enable portable, platform-independent image processing software development.

The IPI API provides a common architectural framework for imaging applications, including image creation, manipulation, storage, and interchange. The bindings in C were chosen to cover a wide range of systems, from embedded imaging devices to high-performance workstations. This standard is essential for developers who require consistent access to imaging functions without reliance on proprietary libraries.

Tip: CAN/CSA ISO/IEC 12089-01 adopts the ISO/IEC text verbatim, so compliance with the international standard ensures acceptance in Canadian markets as well.

Technical Requirements and API Architecture

The standard defines the IPI API as a collection of operations organized into four logical groups:

  • Image Domain Services – creation, destruction, query, and modification of image objects.
  • Pixel Access Operations – reading and writing individual pixel values using standardized data types.
  • Transform Operations – geometric, color, and filtering transformations.
  • Interchange Services – encoding and decoding image data for storage or transmission.

All API functions follow a ipi_ prefix naming convention and return an IPI_Status code indicating success or specific error conditions. The standard mandates that implementations support signed and unsigned 8-bit, 16-bit, and 32-bit integer pixel data, as well as IEEE 754 single-precision floating point.

Core API Functions

The following table summarizes the key functions specified in the C bindings:

Function Purpose Return Type
ipiCreateImage Allocate an image object with given dimensions and pixel type. IPI_Image handle
ipiDestroyImage Release all resources associated with an image. IPI_Status
ipiGetPixel Retrieve the value of a pixel at specified coordinates. IPI_Status
ipiPutPixel Set the value of a pixel at specified coordinates. IPI_Status
ipiTransformImage Apply a predefined transformation (e.g., resize, rotate) to an image. IPI_Status
ipiSaveToInterchange Encode image into IPI interchange format. IPI_Status
ipiLoadFromInterchange Decode image from IPI interchange format. IPI_Status
Warning: Memory management for pixel buffers is the caller’s responsibility. Always check the IPI_Status return value before using data obtained from ipiGetPixel or ipiLoadFromInterchange.

Implementation Highlights and Portability

One of the primary goals of ISO/IEC 12089-01 is to promote source-level portability. By adhering to the API defined in the C language bindings, an application can be recompiled against any conforming implementation with minimal changes. The standard achieves this by:

  • Using typedefs for all IPI data types (e.g., IPI_Byte, IPI_Uint16, IPI_Float32) to insulate code from platform-specific sizes.
  • Defining a clear error-handling model with a finite set of status codes (IPI_SUCCESS, IPI_INVALID_PARAMETER, IPI_MEMORY_FAULT, etc.).
  • Specifying that image data rows are contiguous and aligned to natural boundaries for performance.
  • Requiring that implementations support both row-major and planar pixel layouts through a configurable IPI_Layout parameter.
Success Factor: Applications written against ISO/IEC 12089-01 have been deployed on Windows, Linux, macOS, and various real-time operating systems with minimal platform-specific adaptation.

Extensibility and Future Compatibility

The standard allows vendor-defined extensions through the use of reserved identifier prefixes (ipi_vendor_) and custom transformation codes. However, these extensions must not conflict with the mandated function signatures and error codes. The committee also provides guidance for migrating from earlier ISO/IEC 12087-based implementations to the API-centric model of ISO/IEC 12089.

Compliance and Testing Notes

Conformance to CAN/CSA ISO/IEC 12089-01 is verified through a combination of static analysis and runtime test suites. The standard does not currently require third-party certification, but many industry consortia recommend self-certification using the IPI Validation Suite published by the ISO/IEC JTC 1/SC 24 committee.

Key Compliance Requirements

  • All mandatory functions listed in Clause 6 of the standard must be implemented and exported with exactly the names and signatures specified.
  • The implementation must correctly handle all defined error conditions, including null pointers and out-of-range coordinates.
  • Image interchange files produced by the implementation must be readable by any other conforming implementation (round-trip conformance).
  • Documentation must accompany the implementation listing supported pixel types and any known limitations.
Important: Use of deprecated functions such as ipiSetPixelBlock (removed in the 1995 revision) can cause compilation failures with modern implementations. Always refer to the latest corrigenda.

Testing Recommendations

Developers should run the IPI Conformance Test Suite, which includes over 500 test cases covering pixel accuracy, transformation mathematical correctness, and interchange format parsing. At a minimum, tests for the 8-bit grayscale and 24-bit RGB pixel types are recommended before claiming compliance.

Q: Is CAN/CSA ISO/IEC 12089-01 identical to the ISO/IEC version?
A: Yes, the Canadian standard is an identical adoption. Any differences are limited to minor editorial changes and the addition of a Canadian foreword.
Q: Do I need to implement all pixel types to claim compliance?
A: The standard requires support for at least 8-bit unsigned (IPI_Byte) and 32-bit floating point (IPI_Float32). Other types are optional, but must be reported in the implementation’s documentation.
Q: Can I use these bindings in a multithreaded application?
A: The API is not inherently thread-safe. Concurrent access to the same image object must be serialized by the caller. The standard does, however, guarantee that distinct image handles can be safely used in separate threads.
Q: How does the interchange format handle metadata?
A: The IPI Interchange format supports a header containing image dimensions, pixel type, color space, and optional vendor-specific tags. The ipiLoadFromInterchange function parses this header automatically.

Published 2026 – Technical overview for developers and compliance engineers.

📥 Standard Documents Download

🔒
Please wait 10 seconds, the download links will appear after the ad loads

Leave a Reply

Your email address will not be published. Required fields are marked *