SketchUp C API
|
References an image representation object. More...
#include <SketchUpAPI/model/image_rep.h>
Related Functions | |
(Note that these are not member functions.) | |
enum SUResult | SUImageRepCreate (SUImageRepRef *image) |
Creates a new image object with no image data. Image data can be set using any of SUImageRepCopy, SUImageRepSetData, SUImageRepLoadFile. More... | |
enum SUResult | SUImageRepRelease (SUImageRepRef *image) |
Releases an image object. More... | |
enum SUResult | SUImageRepCopy (SUImageRepRef image, SUImageRepRef copy_image) |
Copies data from the copy_image to image. More... | |
enum SUResult | SUImageRepSetData (SUImageRepRef image, size_t width, size_t height, size_t bits_per_pixel, size_t row_padding, const SUByte pixel_data[]) |
Sets the image data for the given image. Makes a copy of the data rather than taking ownership. More... | |
enum SUResult | SUImageRepLoadFile (SUImageRepRef image, const char *file_path) |
Loads image data from the specified file into the provided image. More... | |
enum SUResult | SUImageRepSaveToFile (SUImageRepRef image, const char *file_path) |
Saves an image object to an image file specified by a path. More... | |
enum SUResult | SUImageRepGetPixelDimensions (SUImageRepRef image, size_t *width, size_t *height) |
Retrieves the width and height dimensions of an image object in pixels. More... | |
enum SUResult | SUImageRepGetRowPadding (SUImageRepRef image, size_t *row_padding) |
Retrieves the size of the row padding of an image, in bytes. More... | |
enum SUResult | SUImageRepResize (SUImageRepRef image, size_t width, size_t height) |
Resizes the dimensions of an image object to the given width and height in pixels. More... | |
enum SUResult | SUImageRepConvertTo32BitsPerPixel (SUImageRepRef image) |
Converts an image object to be 32 bits per pixel. More... | |
enum SUResult | SUImageRepGetDataSize (SUImageRepRef image, size_t *data_size, size_t *bits_per_pixel) |
Returns the total size and bits-per-pixel value of an image. This function is useful to determine the size of the buffer necessary to be passed into SUImageRepGetData(). The returned data can be used along with the returned bits-per-pixel value and the image dimensions to compute RGBA values at individual pixels of the image. More... | |
enum SUResult | SUImageRepGetData (SUImageRepRef image, size_t data_size, SUByte pixel_data[]) |
Returns the pixel data for an image. The given array must be large enough to hold the image's data. This size can be obtained by calling SUImageRepGetDataSize(). More... | |
enum SUResult | SUImageRepGetDataAsColors (SUImageRepRef image, SUColor color_data[]) |
Returns the color data of an image in a SUColor array. More... | |
enum SUResult | SUImageRepGetColorAtUV (SUImageRepRef image, double u, double v, bool bilinear, SUColor *color) |
Returns the color data given by the UV texture coordinates. More... | |
References an image representation object.
|
related |
Converts an image object to be 32 bits per pixel.
[in] | image | The image object. |
|
related |
Copies data from the copy_image to image.
[in,out] | image | The image object to be altered. |
[in] | copy_image | The original image to copy from. |
|
related |
Creates a new image object with no image data. Image data can be set using any of SUImageRepCopy, SUImageRepSetData, SUImageRepLoadFile.
[out] | image | The image object created. |
|
related |
Returns the color data given by the UV texture coordinates.
[in] | image | The image object. |
[in] | u | The U texture coordinate. |
[in] | v | The V texture coordinate. |
[in] | bilinear | The flag to set bilinear texture filtering. This interpolates the colors instead of picking the nearest neighbor. |
[out] | color | The returned color. |
|
related |
Returns the pixel data for an image. The given array must be large enough to hold the image's data. This size can be obtained by calling SUImageRepGetDataSize().
[in] | image | The image object. |
[in] | data_size | The size of the byte array. |
[out] | pixel_data | The image data retrieved. |
|
related |
Returns the color data of an image in a SUColor array.
[in] | image | The image object. |
[out] | color_data | The SUColor data retrieved. |
|
related |
Returns the total size and bits-per-pixel value of an image. This function is useful to determine the size of the buffer necessary to be passed into SUImageRepGetData(). The returned data can be used along with the returned bits-per-pixel value and the image dimensions to compute RGBA values at individual pixels of the image.
[in] | image | The image object. |
[out] | data_size | The total size of the image data in bytes. |
[out] | bits_per_pixel | The number of bits per pixel of the image data. |
|
related |
Retrieves the width and height dimensions of an image object in pixels.
[in] | image | The image object. |
[out] | width | The width dimension retrieved. |
[out] | height | The height dimension retrieved. |
|
related |
Retrieves the size of the row padding of an image, in bytes.
[in] | image | The image object. |
[out] | row_padding | The row padding retrieved. |
|
related |
Loads image data from the specified file into the provided image.
[in,out] | image | The image object used to load the file. |
[in] | file_path | The file path of the source image file. Assumed to be UTF-8 encoded. |
|
related |
Releases an image object.
[in] | image | The image object. |
|
related |
Resizes the dimensions of an image object to the given width and height in pixels.
[in] | image | The image object. |
[in] | width | The new width. |
[in] | height | The new height. |
|
related |
Saves an image object to an image file specified by a path.
[in] | image | The image object. |
[in] | file_path | The file path of the destination image file. Assumed to be UTF-8 encoded. |
|
related |
Sets the image data for the given image. Makes a copy of the data rather than taking ownership.
[in,out] | image | The image object used to load the data. |
[in] | width | The width of the image in pixels. |
[in] | height | The height of the image in pixels. |
[in] | bits_per_pixel | The number of bits per pixel. |
[in] | row_padding | The size in Bytes of row padding in each row of pixel_data. |
[in] | pixel_data | The raw image data. |