scenepic 1.1.0
3D Visualization Made Easy
Public Member Functions | Friends | List of all members
scenepic::Image Class Reference

A ScenePic Image type. More...

#include <image.h>

Public Member Functions

void load (const std::string &path)
 Load an image file from the disk. More...
 
std::string to_string () const
 Return a JSON string representing the object. More...
 
JsonValue to_json () const
 Convert this object into ScenePic json. More...
 
const std::string & image_id () const
 A unique identifier for the image. More...
 
const std::vector< std::uint8_t > & data () const
 The encoded binary image data. More...
 
std::vector< std::uint8_t > & data ()
 The encoded binary image data. More...
 
Imagedata (const std::vector< std::uint8_t > &value)
 The encoded binary image data. More...
 
const std::string & ext () const
 The extension of the image (e.g. More...
 
Imageext (const std::string &value)
 The extension of the image (e.g. More...
 

Friends

class Scene
 

Detailed Description

A ScenePic Image type.

Member Function Documentation

◆ data() [1/3]

std::vector< std::uint8_t > & scenepic::Image::data ( )

The encoded binary image data.

◆ data() [2/3]

const std::vector< std::uint8_t > & scenepic::Image::data ( ) const

The encoded binary image data.

◆ data() [3/3]

Image & scenepic::Image::data ( const std::vector< std::uint8_t > &  value)

The encoded binary image data.

◆ ext() [1/2]

const std::string & scenepic::Image::ext ( ) const

The extension of the image (e.g.

JPG, PNG)

◆ ext() [2/2]

Image & scenepic::Image::ext ( const std::string &  value)

The extension of the image (e.g.

JPG, PNG)

◆ image_id()

const std::string & scenepic::Image::image_id ( ) const

A unique identifier for the image.

◆ load()

void scenepic::Image::load ( const std::string &  path)

Load an image file from the disk.

Parameters
paththe path to the image file

◆ to_json()

JsonValue scenepic::Image::to_json ( ) const

Convert this object into ScenePic json.

Returns
a json value

◆ to_string()

std::string scenepic::Image::to_string ( ) const

Return a JSON string representing the object.

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

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