ofDoc > graphics > ofImage

ofImagefile

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.

Variants

ofImage typedef
ofFloatImage typedef
ofShortImage typedef

Enums

Functions

ofImage_class

template<typename PixelType>
class ofImage_< PixelType >

A class representing an image using memory and gpu based pixels.

Template Parameters
PixelTypeThe data type used to represent a single pixel value.

Image Construction

clear ()
clone ()
load ()
loadImage () Use load instead

Drawing

draw ()

Texture

update ()
getTextureReference () Use getTexture
bind ()
unbind ()

Pixel Getters

getPixelsRef () Use getPixels() instead

Pixel Setters

Modifiers

resize ()
crop ()
mirror ()

Anchor

Saving

save ()
saveImage () Use save instead

Operators

Attributes

width variable
height variable
bpp variable
type variable

Functions

draw ()