ImageIO.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Image I/O routines
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _IMAGEIO_H_
12 #define _IMAGEIO_H_
13 
15 #include <artec/sdk/base/Errors.h>
16 #include <artec/sdk/base/IImage.h>
17 
18 namespace artec { namespace sdk { namespace base { namespace io
19 {
20 
21 extern "C"
22 {
23 /** Load float-value image from file
24 * @return error code
25 */
27  loadImage32fFromFile(IImage** image, const wchar_t* path);
28 
29 /** Save float-value image in file
30 * @return error code
31 */
33  saveImage32fToFile(const wchar_t* path, const IImage* image);
34 
35 /** Load image from file while automatically detecting it's type by extension.
36 * @note currently BMP, JPG, PNG
37 * @return error code
38 */
40  loadImageFromFile(IImage** image, const wchar_t* path);
41 
42 /** Load image from data in memory buffer while automatically detecting it's type by extension.
43 * @note currently BMP, JPG, PNG
44 * @param formatExt
45 * ".bmp" for BMP
46 * ".jpg" or ".jpeg" or ".jpe" for JPG
47 * ".png" for PNG
48 * @return error code
49 */
51  loadImageFromBlob(IImage** image, const IBlob* data, const wchar_t* formatExt);
52 
53 /** Save image to file automatically detecting it's type by extension.
54 * @note currently BMP, JPG, PNG
55 * @return error code
56 */
58  saveImageToFile(const wchar_t* path, const IImage* image);
59 
60 /** Save image to memory buffer automatically detecting it's type by extension.
61 * @note currently BMP, JPG, PNG
62 * @param $formatExt
63 * ".bmp" for BMP
64 * ".jpg" or ".jpeg" or ".jpe" for JPG
65 * ".png" for PNG
66 * @return error code
67 */
69  saveImageToBlob(IBlob** data, const IImage* image, const wchar_t* formatExt);
70 }
71 
72 } } } } // namespace artec::sdk::base::io
73 
74 #endif //_IMAGEIO_H_
ErrorCode ABASESDK_LINK_SPEC loadImageFromFile(IImage **image, const wchar_t *path)
ErrorCode ABASESDK_LINK_SPEC loadImageFromBlob(IImage **image, const IBlob *data, const wchar_t *formatExt)
ErrorCode ABASESDK_LINK_SPEC loadImage32fFromFile(IImage **image, const wchar_t *path)
ErrorCode ABASESDK_LINK_SPEC saveImage32fToFile(const wchar_t *path, const IImage *image)
ErrorCode ABASESDK_LINK_SPEC saveImageToFile(const wchar_t *path, const IImage *image)
#define ABASESDK_LINK_SPEC
Definition: BaseSdkDefines.h:7
ErrorCode ABASESDK_LINK_SPEC saveImageToBlob(IBlob **data, const IImage *image, const wchar_t *formatExt)