The small3d framework
Public Member Functions | List of all members
small3d::Image Class Reference

An image, loaded from a png file, which can be used for generating textures. More...

#include <Image.hpp>

Public Member Functions

 Image (const std::string fileLocation="")
 Default constructor. More...
 
 ~Image ()=default
 Destructor.
 
void toColour (glm::vec4 colour)
 Convert to a coloured 10 x 10 pixel image.
 
unsigned long getWidth () const
 Get the image width. More...
 
unsigned long getHeight () const
 Get the image height. More...
 
unsigned long getByteSize () const
 Get the size of the image, in bytes. More...
 
const float * getData () const
 Get the image data. More...
 

Detailed Description

An image, loaded from a png file, which can be used for generating textures.

Constructor & Destructor Documentation

◆ Image()

small3d::Image::Image ( const std::string  fileLocation = "")

Default constructor.

Parameters
fileLocationLocation of the png image file

Member Function Documentation

◆ getByteSize()

unsigned long small3d::Image::getByteSize ( ) const

Get the size of the image, in bytes.

Returns
Size of the image, in bytes

◆ getData()

const float * small3d::Image::getData ( ) const

Get the image data.

Returns
The image data

◆ getHeight()

unsigned long small3d::Image::getHeight ( ) const

Get the image height.

Returns
The image height

◆ getWidth()

unsigned long small3d::Image::getWidth ( ) const

Get the image width.

Returns
The image width

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