version.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Copyright (c) the JPEG XL Project Authors. All rights reserved.
  2. *
  3. * Use of this source code is governed by a BSD-style
  4. * license that can be found in the LICENSE file.
  5. */
  6. /** @addtogroup libjxl_common
  7. * @{
  8. * @file version.h
  9. * @brief libjxl version information
  10. */
  11. #ifndef JXL_VERSION_H_
  12. #define JXL_VERSION_H_
  13. #define JPEGXL_MAJOR_VERSION 0 ///< JPEG XL Major version
  14. #define JPEGXL_MINOR_VERSION 11 ///< JPEG XL Minor version
  15. #define JPEGXL_PATCH_VERSION 0 ///< JPEG XL Patch version
  16. /** Can be used to conditionally compile code for a specific JXL version
  17. * @param[maj] major version
  18. * @param[min] minor version
  19. *
  20. * @code
  21. * #if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,8,0)
  22. * // use old/deprecated api
  23. * #else
  24. * // use current api
  25. * #endif
  26. * @endcode
  27. */
  28. #define JPEGXL_COMPUTE_NUMERIC_VERSION(major,minor,patch) (((major)<<24) | ((minor)<<16) | ((patch)<<8) | 0)
  29. /* Numeric representation of the version */
  30. #define JPEGXL_NUMERIC_VERSION JPEGXL_COMPUTE_NUMERIC_VERSION(JPEGXL_MAJOR_VERSION, JPEGXL_MINOR_VERSION, JPEGXL_PATCH_VERSION)
  31. #endif /* JXL_VERSION_H_ */
  32. /** @}*/