NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
iimage_api.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
6 //*****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_IIMAGE_API_H
9 #define MI_NEURAYLIB_IIMAGE_API_H
10 
12 #include <mi/neuraylib/version.h>
13 
14 namespace mi {
15 
16 namespace neuraylib {
17 
18 class IBuffer;
19 class ICanvas;
20 class IReader;
21 class ITile;
22 
29 class IImage_api : public
36  mi::base::Interface_declare<0x4c25a4f0,0x2bac,0x4ce6,0xb0,0xab,0x4d,0x94,0xbf,0xfd,0x97,0xa5>
37 {
38 public:
40 
41 
64  virtual ICanvas* create_canvas(
65  const char* pixel_type,
66  Uint32 width,
67  Uint32 height,
68  Uint32 tile_width = 0,
69  Uint32 tile_height = 0,
70  Uint32 layers = 1,
71  bool is_cubemap = false,
72  Float32 gamma = 0.0f) const = 0;
73 
88  virtual ITile* create_tile(
89  const char* pixel_type,
90  Uint32 width,
91  Uint32 height) const = 0;
92 
94 
96 
122  virtual Sint32 read_raw_pixels(
123  Uint32 width,
124  Uint32 height,
125  const ICanvas* canvas,
126  Uint32 canvas_x,
127  Uint32 canvas_y,
128  Uint32 canvas_layer,
129  void* buffer,
130  bool buffer_topdown,
131  const char* buffer_pixel_type,
132  Uint32 buffer_padding = 0) const = 0;
133 
159  virtual Sint32 write_raw_pixels(
160  Uint32 width,
161  Uint32 height,
162  ICanvas* canvas,
163  Uint32 canvas_x,
164  Uint32 canvas_y,
165  Uint32 canvas_layer,
166  const void* buffer,
167  bool buffer_topdown,
168  const char* buffer_pixel_type,
169  Uint32 buffer_padding = 0) const = 0;
170 
172 
174 
188  virtual IBuffer* create_buffer_from_canvas(
189  const ICanvas* canvas,
190  const char* image_format,
191  const char* pixel_type,
192  const char* quality) const = 0;
193 
201  virtual ICanvas* create_canvas_from_buffer(
202  const IBuffer* buffer,
203  const char* image_format) const = 0;
204 
220  virtual bool supports_format_for_decoding(
221  const char* image_format, IReader* reader = 0) const = 0;
222 
236  virtual bool supports_format_for_encoding( const char* image_format) const = 0;
237 
239 
241 
271  virtual ICanvas* convert( const ICanvas* canvas, const char* pixel_type) const = 0;
272 
281  virtual void adjust_gamma( ICanvas* canvas, Float32 new_gamma) const = 0;
282 
284 
286 
293  virtual Uint32 get_components_per_pixel( const char* pixel_type) const = 0;
294 
301  virtual Uint32 get_bytes_per_component( const char* pixel_type) const = 0;
302 
304 };
305  // end group mi_neuray_rendering
307 
308 } // namespace neuraylib
309 
310 #ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
311 using neuraylib::IBuffer;
312 using neuraylib::IReader;
313 #endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
314 
315 } // namespace mi
316 
317 #endif // MI_NEURAYLIB_IIMAGE_API_H