Textures are digital images that you can use to show content in Image nodes, to set the look of textured materials, and to show content in Texture Brush brushes.
More...
|
unsigned int | kanzi::calculateMipmapLevelCount (unsigned int width, unsigned int height) |
| Calculates number of mipmap levels for provided image size. More...
|
|
TextureSharedPtr | kanzi::createTextureFromMemory (Domain *domain, unsigned int width, unsigned int height, GraphicsFormat sourceFormat, const void *data, GraphicsFormat destinationFormat, string_view name) |
| Loads a new image from memory and creates a texture out of it. More...
|
|
unsigned int | kanzi::getGLTextureImageTarget (TextureType type, unsigned int face) |
|
unsigned int | kanzi::getGLTextureTarget (TextureType type) |
|
BitmapImageUniquePtr | kanzi::imageLoadJPEG (File &file, string_view name="") |
| Loads a JPEG image from an input stream. More...
|
|
BitmapImageUniquePtr | kanzi::imageLoadJPEG (File &file, const LibJPEGParameters &libjpegParameters, string_view name="") |
| Loads a JPEG image from an input stream. More...
|
|
BitmapImageUniquePtr | kanzi::imageLoadPNG (File &file, string_view name="") |
| Loads a PNG image from an input stream. More...
|
|
BitmapImageUniquePtr | kanzi::imageLoadPNG (File &file, const LibPNGParameters &libpngParameters, string_view name="") |
| Loads a PNG image from an input stream. More...
|
|
void | kanzi::imageSaveJPEG (const BitmapImage &image, File &file, float quality=1.0f) |
| Saves an image as a JPEG to an output stream. More...
|
|
void | kanzi::imageSavePNG (const BitmapImage &image, File &file) |
| Saves an image as a PNG to an output stream. More...
|
|
void | kanzi::imageSavePNGPaletted (const BitmapImage &image, File &file) |
| Saves an image as a paletted PNG to an output stream. More...
|
|
void | kanzi::swap (Texture &texture1, Texture &texture2) |
|
Textures are digital images that you can use to show content in Image nodes, to set the look of textured materials, and to show content in Texture Brush brushes.
You can create textures from common image file formats.
◆ ImageResizeFilter
Image resizing filter methods.
Enumerator |
---|
ResizeFilterNearestNeighbor | Nearest neighbor filter.
|
ResizeFilterBilinear | Bilinear filter.
|
ResizeFilterWeightedAverage | Weighted average filter.
|
◆ imageLoadPNG() [1/2]
Loads a PNG image from an input stream.
- Parameters
-
file | The input file to read from. |
name | (Optional) A name for the image. |
- Returns
- Unique pointer to the loaded image.
◆ imageLoadPNG() [2/2]
Loads a PNG image from an input stream.
- Parameters
-
file | The input file from which to read. |
libpngParameters | The parameters that Kanzi passes to libpng. |
name | (Optional) A name for the image. |
- Returns
- Unique pointer to the loaded image.
- Since
- Kanzi 3.9.3
◆ imageLoadJPEG() [1/2]
Loads a JPEG image from an input stream.
- Parameters
-
file | The input file to read from. |
name | (Optional) A name for the image. |
- Returns
- Unique pointer to the loaded image.
◆ imageLoadJPEG() [2/2]
Loads a JPEG image from an input stream.
- Parameters
-
file | The input file from which to read. |
libjpegParameters | The parameters that Kanzi passes to libjpeg. |
name | (Optional) A name for the image. |
- Returns
- Unique pointer to the loaded image.
- Since
- Kanzi 3.9.3
◆ imageSavePNG()
Saves an image as a PNG to an output stream.
- Parameters
-
image | The image. |
file | The output file to write to. |
◆ imageSavePNGPaletted()
void kanzi::imageSavePNGPaletted |
( |
const BitmapImage & |
image, |
|
|
File & |
file |
|
) |
| |
Saves an image as a paletted PNG to an output stream.
- Parameters
-
image | The image. |
file | The output file to write to. |
◆ imageSaveJPEG()
void kanzi::imageSaveJPEG |
( |
const BitmapImage & |
image, |
|
|
File & |
file, |
|
|
float |
quality = 1.0f |
|
) |
| |
Saves an image as a JPEG to an output stream.
- Parameters
-
image | The image. |
file | The output file to write to. |
quality | The JPEG compression quality between 0..1, 1 being the best quality. |
◆ swap()
◆ getGLTextureImageTarget()
unsigned int kanzi::getGLTextureImageTarget |
( |
TextureType |
type, |
|
|
unsigned int |
face |
|
) |
| |
◆ getGLTextureTarget()
unsigned int kanzi::getGLTextureTarget |
( |
TextureType |
type | ) |
|
◆ createTextureFromMemory()
Loads a new image from memory and creates a texture out of it.
- Parameters
-
domain | Domain to use. |
width | Width of the image. |
height | Height of the image. |
sourceFormat | Graphics surface format of the source data. |
data | Pointer to the source data in memory. |
destinationFormat | Graphics surface format to convert image data to. Use sourceFormat to skip surface format conversion. |
name | Name for the texture. |
- Returns
- A shared pointer to the created texture.
◆ calculateMipmapLevelCount()
unsigned int kanzi::calculateMipmapLevelCount |
( |
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
Calculates number of mipmap levels for provided image size.
- Parameters
-
width | Width of the image. |
height | Height of the image. |
- Returns
- Number of mipmap levels for image of given size.