vil_save.h
Go to the documentation of this file.
1 // This is core/vil/vil_save.h
2 #ifndef vil_save_h_
3 #define vil_save_h_
4 //:
5 // \file
6 // \author Ian Scott
7 
8 #include <vil/vil_fwd.h>
9 #ifdef _MSC_VER
10 # include <vcl_msvc_warnings.h>
11 #endif
12 #include <vxl_config.h>
13 
14 //: Send a vil_image_view to disk, deducing format from filename
15 // \relatesalso vil_image_view
16 bool vil_save(const vil_image_view_base &, char const* filename);
17 
18 //: Send a vil_image_view to disk, given filename
19 // \relatesalso vil_image_view
20 bool vil_save(const vil_image_view_base &, char const* filename, char const* file_format);
21 
22 //: Send vil_image_resource to disk.
23 // \relatesalso vil_image_resource
24 bool vil_save_image_resource(const vil_image_resource_sptr &ir, char const* filename,
25  char const* file_format);
26 
27 //: Save vil_image_resource to file, deducing format from filename.
28 // \relatesalso vil_image_resource
29 bool vil_save_image_resource(const vil_image_resource_sptr &ir, char const* filename);
30 
31 //: Given a filename, guess the file format tag
32 // The returned pointer may point into the filename string - so keep it valid.
33 char const *vil_save_guess_file_format(char const* filename);
34 
35 
36 #if defined(_WIN32) && VXL_USE_WIN_WCHAR_T
37 //: Send a vil_image_view to disk, deducing format from filename
38 // \relatesalso vil_image_view
39 bool vil_save(const vil_image_view_base &, wchar_t const* filename);
40 
41 //: Send a vil_image_view to disk, given filename
42 // \relatesalso vil_image_view
43 bool vil_save(const vil_image_view_base &, wchar_t const* filename, wchar_t const* file_format);
44 
45 //: Send vil_image_resource to disk.
46 // \relatesalso vil_image_resource
47 bool vil_save_image_resource(const vil_image_resource_sptr &ir, wchar_t const* filename,
48  wchar_t const* file_format);
49 
50 //: Save vil_image_resource to file, deducing format from filename.
51 // \relatesalso vil_image_resource
52 bool vil_save_image_resource(const vil_image_resource_sptr &ir, wchar_t const* filename);
53 
54 //: Given a filename, guess the file format tag
55 // The returned pointer may point into the filename string - so keep it valid.
56 wchar_t const *vil_save_guess_file_format(wchar_t const* filename);
57 #endif //defined(_WIN32) && VXL_USE_WIN_WCHAR_T
58 
59 #endif // vil_save_h_
bool vil_save_image_resource(const vil_image_resource_sptr &ir, char const *filename, char const *file_format)
Send vil_image_resource to disk.
Definition: vil_save.cxx:129
An abstract base class of smart pointers to actual image data in memory.
char const * vil_save_guess_file_format(char const *filename)
Given a filename, guess the file format tag.
Definition: vil_save.cxx:80
bool vil_save(const vil_image_view_base &, char const *filename)
Send a vil_image_view to disk, deducing format from filename.
Definition: vil_save.cxx:123