neuray API Programmer's Manual

mi::neuraylib::IImage_file Class Reference

[Extensions and Plugins]

Description

Abstract interface for image files. Instance of this interface are created by mi::neuraylib::IImage_plugin::open_for_writing() or mi::neuraylib::IImage_plugin::open_for_reading().

Public Member Functions

virtual Float32 get_gamma() const =0
Returns the gamma value of the image.
virtual bool  get_is_cubemap() const =0
Indicates whether the image represents a cubemap. More...
virtual Uint32 get_layers_size( Uint32 level) const =0
Returns the number of layers of the image. More...
virtual Uint32 get_miplevels() const =0
Returns number of miplevels.
virtual Uint32 get_resolution_x( Uint32 level) const =0
Returns the resolution of the image in x direction. More...
virtual Uint32 get_resolution_y( Uint32 level) const =0
Returns the resolution of the image in y direction. More...
virtual const char* get_type() const =0
Returns the pixel type of the image (or the requested channel). More...
virtual ITileread( Uint32 z, Uint32 level) const =0
Read pixels from the image file into a tile. More...
virtual bool  write( const ITile* tile, Uint32 z, Uint32 level) =0
Write pixels from a tile into the image file. More...

Member Functions

virtual Float32 mi::​neuraylib::​IImage_file::get_gamma() const [pure virtual]

Returns the gamma value of the image.

virtual bool mi::​neuraylib::​IImage_file::get_is_cubemap() const [pure virtual]

Indicates whether the image represents a cubemap.

Returns

if the image represents a cubemap, false otherwise.

virtual Uint32 mi::​neuraylib::​IImage_file::get_layers_size( Uint32 level) const [pure virtual]

Returns the number of layers of the image.

Parameters

level
The mipmap level (always 0 if the image is not a mipmap).

Returns

The number of layers of the image.

virtual Uint32 mi::​neuraylib::​IImage_file::get_miplevels() const [pure virtual]

Returns number of miplevels.

virtual Uint32 mi::​neuraylib::​IImage_file::get_resolution_x( Uint32 level) const [pure virtual]

Returns the resolution of the image in x direction.

Parameters

level
The mipmap level (always 0 if the image is not a mipmap).

Returns

The resolution of the image in x direction.

virtual Uint32 mi::​neuraylib::​IImage_file::get_resolution_y( Uint32 level) const [pure virtual]

Returns the resolution of the image in y direction.

Parameters

level
The mipmap level (always 0 if the image is not a mipmap).

Returns

The resolution of the image in y direction.

virtual const char* mi::​neuraylib::​IImage_file::get_type() const [pure virtual]

Returns the pixel type of the image (or the requested channel). See Types for a list of supported pixel types.

virtual ITile* mi::​neuraylib::​IImage_file::read( Uint32 z, Uint32 level) const [pure virtual]

Read pixels from the image file into a tile. This method will never be called if this instance was obtained from mi::neuraylib::IImage_plugin::open_for_writing().

Parameters

z
The z layer (for 3d textures or cubemaps).
level
The mipmap level (always 0 if the image is not a mipmap).

Returns

The tile with the read data, or NULL in case of failures.

virtual bool mi::​neuraylib::​IImage_file::write( const ITile* tile, Uint32 z, Uint32 level) [pure virtual]

Write pixels from a tile into the image file. This method will never be called if this instance was obtained from mi::neuraylib::IImage_plugin::open_for_reading().

Parameters

tile
The tile to read the data from.
z
The z layer (for 3d textures or cubemaps).
level
The mipmap level (always 0 if the image is not a mipmap).

Returns

true if the tile was successfully written, false otherwise.