3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
coat::Image Class Reference

The image references. Look the cImage for the list of allowed operations. More...

#include <CoreAPI.h>

Inheritance diagram for coat::Image:

Public Member Functions

 Image (const Image &im)
 
bool Read (const char *name)
 Read the image from the file.
 
bool Write (const char *name)
 Write the image to file.
 
bool FromTexture (int texture_id)
 Get image from texture.
 
int ToTexture ()
 Create texture from image.
 
int Paste (PY_BYTE_ARRAY src_data, int pasteLeft=0, int pasteTop=0, int cropLeft=0, int cropTop=0, int cropRight=0, int cropBottom=0, bool flipY=false)
 paste image to image
 
size_t Pointer ()
 Pointer to the data.
 
bool FromArray (PY_BYTE_ARRAY src_data)
 Get image from texture.
 
bool FromArray (PY_DWORD_ARRAY src_data)
 
bool FromArray (PY_FLOAT_ARRAY src_data)
 
pybind11::buffer_info _py_buffer_info ()
 

Detailed Description

The image references. Look the cImage for the list of allowed operations.

Examples
TreesGenerator.cpp.

Member Function Documentation

◆ FromArray()

bool coat::Image::FromArray ( PY_BYTE_ARRAY src_data)

Get image from texture.

Parameters
numpyarray for source
Returns
true if succeed

◆ FromTexture()

bool coat::Image::FromTexture ( int texture_id)

Get image from texture.

Parameters
textureid
Returns
true if succeed

◆ Paste()

int coat::Image::Paste ( PY_BYTE_ARRAY src_data,
int pasteLeft = 0,
int pasteTop = 0,
int cropLeft = 0,
int cropTop = 0,
int cropRight = 0,
int cropBottom = 0,
bool flipY = false )

paste image to image

Parameters
numpyarray for source
pasteLeft
pasteTop
cropLeft
cropTop
cropRight
cropBottom
flipY
Returns
true if succeed

◆ Pointer()

size_t coat::Image::Pointer ( )

Pointer to the data.

Returns
true if succeed

◆ Read()

bool coat::Image::Read ( const char * name)

Read the image from the file.

Parameters
namethe image name
Returns
true if loaded successfully
Examples
TreesGenerator.cpp.

◆ ToTexture()

int coat::Image::ToTexture ( )

Create texture from image.

Returns
true if succeed

◆ Write()

bool coat::Image::Write ( const char * name)

Write the image to file.

Parameters
namethe filename
Returns
true if succeed

The documentation for this class was generated from the following file: