PageRenderTime 338ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/opencv2.framework/Versions/A/Headers/imgcodecs/imgcodecs_c.h

https://gitlab.com/netskink/anotherOpenCVTesty
C Header | 137 lines | 56 code | 19 blank | 62 comment | 0 complexity | 33189def93eec0ffdebfae171cff1507 MD5 | raw file
  1. /*M///////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
  4. //
  5. // By downloading, copying, installing or using the software you agree to this license.
  6. // If you do not agree to this license, do not download, install,
  7. // copy or use the software.
  8. //
  9. //
  10. // Intel License Agreement
  11. // For Open Source Computer Vision Library
  12. //
  13. // Copyright (C) 2000, Intel Corporation, all rights reserved.
  14. // Third party copyrights are property of their respective owners.
  15. //
  16. // Redistribution and use in source and binary forms, with or without modification,
  17. // are permitted provided that the following conditions are met:
  18. //
  19. // * Redistribution's of source code must retain the above copyright notice,
  20. // this list of conditions and the following disclaimer.
  21. //
  22. // * Redistribution's in binary form must reproduce the above copyright notice,
  23. // this list of conditions and the following disclaimer in the documentation
  24. // and/or other materials provided with the distribution.
  25. //
  26. // * The name of Intel Corporation may not be used to endorse or promote products
  27. // derived from this software without specific prior written permission.
  28. //
  29. // This software is provided by the copyright holders and contributors "as is" and
  30. // any express or implied warranties, including, but not limited to, the implied
  31. // warranties of merchantability and fitness for a particular purpose are disclaimed.
  32. // In no event shall the Intel Corporation or contributors be liable for any direct,
  33. // indirect, incidental, special, exemplary, or consequential damages
  34. // (including, but not limited to, procurement of substitute goods or services;
  35. // loss of use, data, or profits; or business interruption) however caused
  36. // and on any theory of liability, whether in contract, strict liability,
  37. // or tort (including negligence or otherwise) arising in any way out of
  38. // the use of this software, even if advised of the possibility of such damage.
  39. //
  40. //M*/
  41. #ifndef __OPENCV_IMGCODECS_H__
  42. #define __OPENCV_IMGCODECS_H__
  43. #include "opencv2/core/core_c.h"
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif /* __cplusplus */
  47. /** @addtogroup imgcodecs_c
  48. @{
  49. */
  50. enum
  51. {
  52. /* 8bit, color or not */
  53. CV_LOAD_IMAGE_UNCHANGED =-1,
  54. /* 8bit, gray */
  55. CV_LOAD_IMAGE_GRAYSCALE =0,
  56. /* ?, color */
  57. CV_LOAD_IMAGE_COLOR =1,
  58. /* any depth, ? */
  59. CV_LOAD_IMAGE_ANYDEPTH =2,
  60. /* ?, any color */
  61. CV_LOAD_IMAGE_ANYCOLOR =4
  62. };
  63. /* load image from file
  64. iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED
  65. overrides the other flags
  66. using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED
  67. unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
  68. */
  69. CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
  70. CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
  71. enum
  72. {
  73. CV_IMWRITE_JPEG_QUALITY =1,
  74. CV_IMWRITE_JPEG_PROGRESSIVE =2,
  75. CV_IMWRITE_JPEG_OPTIMIZE =3,
  76. CV_IMWRITE_JPEG_RST_INTERVAL =4,
  77. CV_IMWRITE_JPEG_LUMA_QUALITY =5,
  78. CV_IMWRITE_JPEG_CHROMA_QUALITY =6,
  79. CV_IMWRITE_PNG_COMPRESSION =16,
  80. CV_IMWRITE_PNG_STRATEGY =17,
  81. CV_IMWRITE_PNG_BILEVEL =18,
  82. CV_IMWRITE_PNG_STRATEGY_DEFAULT =0,
  83. CV_IMWRITE_PNG_STRATEGY_FILTERED =1,
  84. CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2,
  85. CV_IMWRITE_PNG_STRATEGY_RLE =3,
  86. CV_IMWRITE_PNG_STRATEGY_FIXED =4,
  87. CV_IMWRITE_PXM_BINARY =32,
  88. CV_IMWRITE_WEBP_QUALITY =64
  89. };
  90. /* save image to file */
  91. CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,
  92. const int* params CV_DEFAULT(0) );
  93. /* decode image stored in the buffer */
  94. CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
  95. CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
  96. /* encode image and store the result as a byte vector (single-row 8uC1 matrix) */
  97. CVAPI(CvMat*) cvEncodeImage( const char* ext, const CvArr* image,
  98. const int* params CV_DEFAULT(0) );
  99. enum
  100. {
  101. CV_CVTIMG_FLIP =1,
  102. CV_CVTIMG_SWAP_RB =2
  103. };
  104. /* utility function: convert one image to another with optional vertical flip */
  105. CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));
  106. CVAPI(int) cvHaveImageReader(const char* filename);
  107. CVAPI(int) cvHaveImageWriter(const char* filename);
  108. /****************************************************************************************\
  109. * Obsolete functions/synonyms *
  110. \****************************************************************************************/
  111. #define cvvLoadImage(name) cvLoadImage((name),1)
  112. #define cvvSaveImage cvSaveImage
  113. #define cvvConvertImage cvConvertImage
  114. /** @} imgcodecs_c */
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif // __OPENCV_IMGCODECS_H__