You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.8 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 2004-2025 by EMGU Corporation. All rights reserved.
  4. //
  5. //----------------------------------------------------------------------------
  6. #pragma once
  7. #ifndef EMGU_IMGCODECS_C_H
  8. #define EMGU_IMGCODECS_C_H
  9. #include "opencv2/core/core_c.h"
  10. #ifdef HAVE_OPENCV_IMGCODECS
  11. #include "opencv2/imgcodecs/imgcodecs.hpp"
  12. #else
  13. static inline CV_NORETURN void throw_no_imgcodecs() { CV_Error(cv::Error::StsBadFunc, "The library is compiled without imgcodecs support. To use this module, please switch to the full Emgu CV runtime."); }
  14. #endif
  15. CVAPI(bool) cveHaveImageReader(cv::String* filename);
  16. CVAPI(bool) cveHaveImageWriter(cv::String* filename);
  17. CVAPI(bool) cveImwrite(cv::String* filename, cv::_InputArray* img, std::vector<int>* params);
  18. CVAPI(bool) cveImwritemulti(cv::String* filename, cv::_InputArray* img, std::vector<int>* params);
  19. CVAPI(bool) cveImwriteWithMetadata(
  20. cv::String* filename,
  21. cv::_InputArray* img,
  22. std::vector< int >* metadataTypes,
  23. cv::_InputArray* metadata,
  24. std::vector< int >* params);
  25. CVAPI(void) cveImread(cv::String* fileName, int flags, cv::Mat* result);
  26. CVAPI(bool) cveImreadmulti(const cv::String* filename, std::vector<cv::Mat>* mats, int flags);
  27. CVAPI(void) cveImreadWithMetadata(
  28. const cv::String* filename,
  29. std::vector<int>* metadataTypes,
  30. cv::_OutputArray* metadata,
  31. int flags,
  32. cv::Mat* result);
  33. CVAPI(void) cveImdecode(cv::_InputArray* buf, int flags, cv::Mat* dst);
  34. CVAPI(bool) cveImdecodemulti(cv::_InputArray* buf, int flags, std::vector<cv::Mat>* mats, cv::Range* range);
  35. CVAPI(void) cveImdecodeWithMetadata(
  36. cv::_InputArray* buf,
  37. std::vector< int >* metadataTypes,
  38. cv::_OutputArray* metadata,
  39. int flags,
  40. cv::Mat* dst);
  41. CVAPI(bool) cveImencode(
  42. cv::String* ext,
  43. cv::_InputArray* img,
  44. std::vector< unsigned char >* buf,
  45. std::vector< int >* params);
  46. CVAPI(bool) cveImencodemulti(
  47. cv::String* ext,
  48. cv::_InputArray* imgs,
  49. std::vector<uchar>* buf,
  50. std::vector<int>* params);
  51. CVAPI(bool) cveImencodeWithMetadata(
  52. cv::String* ext,
  53. cv::_InputArray* img,
  54. std::vector< int >* metadataTypes,
  55. cv::_InputArray* metadata,
  56. std::vector< uchar >* buf,
  57. std::vector< int >* params);
  58. CVAPI(cv::Animation*) cveAnimationCreate(int loopCount, CvScalar* bgColor);
  59. CVAPI(void) cveAnimationRelease(cv::Animation** animation);
  60. CVAPI(std::vector<int>*) cveAnimationGetDurations(cv::Animation* animation);
  61. CVAPI(std::vector<cv::Mat>*) cveAnimationGetFrames(cv::Animation* animation);
  62. CVAPI(bool) cveImreadAnimation(cv::String* filename, cv::Animation* animation, int start, int count);
  63. CVAPI(bool) cveImwriteAnimation(cv::String* filename, cv::Animation* animation, std::vector<int>* params);
  64. #endif