Tucano  0.1
A library for rapid prototyping with modern OpenGL and GLSL
Tucano::ImageImporter Namespace Reference

Functions

static bool loadImage (string filename, Tucano::Texture *tex) __attribute__((unused))
 
static bool writeImage (string filename, Tucano::Framebuffer *fbo, int attach)
 Saves a framebuffer attachment to an image file. More...
 
static bool loadPAMImage (string filename, Tucano::Texture *tex) __attribute__((unused))
 
static bool writePAMImage (string filename, Tucano::Framebuffer *fbo, int attach)
 Saves a framebuffer attachment to an image file Note that since the input is a float image, the max value is arbitrary For now we support only 1 byte per value We are also assuming writing to an RGBA format. More...
 
static bool loadPPMImage (string filename, Tucano::Texture *tex)
 Loads a texture from a PPM file. The texture receives data in the range [0,1] to create a FLOAT texture To convert to PPM in Linux use for example: convert filename.png -compress none filename_out.ppm. More...
 

Function Documentation

static bool Tucano::ImageImporter::loadImage ( string  filename,
Tucano::Texture tex 
)
static
static bool Tucano::ImageImporter::loadPAMImage ( string  filename,
Tucano::Texture tex 
)
static

should check number of necessary bytes from MAXVAL, for now assuming 1 byte but it could also be 2

should check number of necessary bytes from MAXVAL, for now assuming 1 byte but it could also be 2

static bool Tucano::ImageImporter::loadPPMImage ( string  filename,
Tucano::Texture tex 
)
static

Loads a texture from a PPM file. The texture receives data in the range [0,1] to create a FLOAT texture To convert to PPM in Linux use for example: convert filename.png -compress none filename_out.ppm.

Parameters
texPointer to the texture
filenameGiven filename of the PPM file.
Returns
True if loaded successfully, false otherwise
static bool Tucano::ImageImporter::writeImage ( string  filename,
Tucano::Framebuffer fbo,
int  attach 
)
static

Saves a framebuffer attachment to an image file.

Parameters
filenameImage file to save fbo attach
fboPointer to the Framebuffer
attachAttchment number to be saved
static bool Tucano::ImageImporter::writePAMImage ( string  filename,
Tucano::Framebuffer fbo,
int  attach 
)
static

Saves a framebuffer attachment to an image file Note that since the input is a float image, the max value is arbitrary For now we support only 1 byte per value We are also assuming writing to an RGBA format.

Parameters
filenameImage file to save fbo attach
fboPointer to the Framebuffer
attachAttchment number to be saved