This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
#include "ofTexture.h"
#include "ofGLBaseTypes.h"
#include "ofGraphicsConstants.h"
#include "ofGLUtils.h"
#include "ofConstants.h"
Go to the source code of this file.
Classes | |
struct | ofImageLoadSettings |
class | ofImage_< PixelType > |
A class representing an image using memory and gpu based pixels. More... | |
Typedefs | |
typedef ofPixels_< unsigned char > | ofPixels |
typedef ofPixels_< float > | ofFloatPixels |
typedef ofPixels_< unsigned short > | ofShortPixels |
Variants | |
typedef ofImage_< unsigned char > | ofImage |
typedef ofImage_< float > | ofFloatImage |
typedef ofImage_< unsigned short > | ofShortImage |
Detailed Description
ofImage is used for loading, saving and drawing images in openFrameworks. ofImage is a convenient class that lets you both draw images to the screen and manipulate their pixel data. The ofImage allows you to load an image from disk, manipulate the pixels, and create an OpenGL texture that you can display and manipulate on the graphics card. Loading a file into the ofImage allocates an ofPixels object and creates the ofTexture to display the pixels.
Typedef Documentation
◆ ofFloatImage
typedef ofImage_<float> ofFloatImage |
◆ ofFloatPixels
typedef ofPixels_<float> ofFloatPixels |
◆ ofImage
◆ ofPixels
◆ ofShortImage
typedef ofImage_<unsigned short> ofShortImage |
◆ ofShortPixels
typedef ofPixels_<unsigned short> ofShortPixels |
Enumeration Type Documentation
◆ ofImageFormat
enum ofImageFormat |
- Todo:
- Needs documentation.
◆ ofImageQualityType
enum ofImageQualityType |
Used for controlling the save quality of JPEGs.
These values are directly mapped to FreeImage's JPEG quality flags.
Function Documentation
◆ ofCloseFreeImage()
void ofCloseFreeImage | ( | ) |
Deallocates FreeImage resources.
Used internally during shutdown.
◆ ofImageFormatExtension()
|
inline |
◆ ofLoadImage() [1/8]
bool ofLoadImage | ( | ofFloatPixels & | pix, |
const of::filesystem::path & | path, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
◆ ofLoadImage() [2/8]
bool ofLoadImage | ( | ofFloatPixels & | pix, |
const ofBuffer & | buffer, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
◆ ofLoadImage() [3/8]
bool ofLoadImage | ( | ofPixels & | pix, |
const of::filesystem::path & | path, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
- Todo:
- Needs documentation.
◆ ofLoadImage() [4/8]
bool ofLoadImage | ( | ofPixels & | pix, |
const ofBuffer & | buffer, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
◆ ofLoadImage() [5/8]
bool ofLoadImage | ( | ofShortPixels & | pix, |
const of::filesystem::path & | path, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
◆ ofLoadImage() [6/8]
bool ofLoadImage | ( | ofShortPixels & | pix, |
const ofBuffer & | buffer, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
◆ ofLoadImage() [7/8]
bool ofLoadImage | ( | ofTexture & | tex, |
const of::filesystem::path & | path, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
- Todo:
- Needs documentation.
◆ ofLoadImage() [8/8]
bool ofLoadImage | ( | ofTexture & | tex, |
const ofBuffer & | buffer, | ||
const ofImageLoadSettings & | settings = ofImageLoadSettings() |
||
) |
◆ ofSaveImage() [1/6]
bool ofSaveImage | ( | const ofFloatPixels & | pix, |
const of::filesystem::path & | path, | ||
ofImageQualityType | qualityLevel = OF_IMAGE_QUALITY_BEST |
||
) |
- Todo:
- Needs documentation.
◆ ofSaveImage() [2/6]
bool ofSaveImage | ( | const ofFloatPixels & | pix, |
ofBuffer & | buffer, | ||
ofImageFormat | format = OF_IMAGE_FORMAT_PNG , |
||
ofImageQualityType | qualityLevel = OF_IMAGE_QUALITY_BEST |
||
) |
◆ ofSaveImage() [3/6]
bool ofSaveImage | ( | const ofPixels & | pix, |
const of::filesystem::path & | path, | ||
ofImageQualityType | qualityLevel = OF_IMAGE_QUALITY_BEST |
||
) |
- Todo:
- Needs documentation.
◆ ofSaveImage() [4/6]
bool ofSaveImage | ( | const ofPixels & | pix, |
ofBuffer & | buffer, | ||
ofImageFormat | format = OF_IMAGE_FORMAT_PNG , |
||
ofImageQualityType | qualityLevel = OF_IMAGE_QUALITY_BEST |
||
) |
◆ ofSaveImage() [5/6]
bool ofSaveImage | ( | const ofShortPixels & | pix, |
const of::filesystem::path & | path, | ||
ofImageQualityType | qualityLevel = OF_IMAGE_QUALITY_BEST |
||
) |
- Todo:
- Needs documentation.
◆ ofSaveImage() [6/6]
bool ofSaveImage | ( | const ofShortPixels & | pix, |
ofBuffer & | buffer, | ||
ofImageFormat | format = OF_IMAGE_FORMAT_PNG , |
||
ofImageQualityType | qualityLevel = OF_IMAGE_QUALITY_BEST |
||
) |
◆ ofToString() [1/2]
std::string ofToString | ( | const ofImageType & | imgType | ) |
◆ ofToString() [2/2]
std::string ofToString | ( | const T & | value | ) |
Convert a value to a string.
Manipulation
ofToString does its best to convert any value to a string. If the data type implements a stream << operator, then it will be converted.
Example:
- Template Parameters
-
T The data type of the value to convert to a string.
- Parameters
-
value The value to convert to a string.
- Returns
- A string representing the value or an empty string on failure.