reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofPixels_< PixelType > Class Template Reference

A class representing a collection of pixels. More...

#include <ofPixels.h>

Public Member Functions

Construction And Allocation
 ofPixels_ ()
 
 ~ofPixels_ ()
 
 ofPixels_ (const ofPixels_< PixelType > &mom)
 
 ofPixels_ (ofPixels_< PixelType > &&mom)
 
template<typename SrcType >
 ofPixels_ (const ofPixels_< SrcType > &mom)
 
void allocate (size_t w, size_t h, size_t channels)
 Allocates space for pixel data.
 
void allocate (size_t w, size_t h, ofPixelFormat pixelFormat)
 Allocates space for pixel data.
 
void allocate (size_t w, size_t h, ofImageType imageType)
 Allocates space for pixel data.
 
bool isAllocated () const
 Get whether memory has been allocated for an ofPixels object or not.
 
void clear ()
 Clear all the data from the ofPixels objects. After calling this you'll need to allocate() the ofPixels object again to use it.
 
ofPixels_< PixelType > & operator= (const ofPixels_< PixelType > &mom)
 
ofPixels_< PixelType > & operator= (ofPixels_< PixelType > &&mom)
 
template<typename SrcType >
ofPixels_< PixelType > & operator= (const ofPixels_< SrcType > &mom)
 
Set Pixel Data
void set (PixelType val)
 
void set (size_t channel, PixelType val)
 
void setFromPixels (const PixelType *newPixels, size_t w, size_t h, size_t channels)
 
void setFromPixels (const PixelType *newPixels, size_t w, size_t h, ofPixelFormat pixelFormat)
 
void setFromPixels (const PixelType *newPixels, size_t w, size_t h, ofImageType type)
 
void setFromExternalPixels (PixelType *newPixels, size_t w, size_t h, size_t channels)
 
void setFromExternalPixels (PixelType *newPixels, size_t w, size_t h, ofPixelFormat pixelFormat)
 
void setFromAlignedPixels (const PixelType *newPixels, size_t width, size_t height, size_t channels, size_t stride)
 
void setFromAlignedPixels (const PixelType *newPixels, size_t width, size_t height, ofPixelFormat pixelFormat, size_t stride)
 
void setFromAlignedPixels (const PixelType *newPixels, size_t width, size_t height, ofPixelFormat pixelFormat, std::vector< size_t > strides)
 used to copy i420 pixels from gstreamer when (width % 4) != 0
 
void swap (ofPixels_< PixelType > &pix)
 
Modify Existing Data
void crop (size_t x, size_t y, size_t width, size_t height)
 Crop the pixels to a new width and height.
 
void cropTo (ofPixels_< PixelType > &toPix, size_t x, size_t y, size_t width, size_t height) const
 Crop the pixels into the ofPixels reference passed in by toPix. at thexandy` and width the new width and height.
 
void rotate90 (int nClockwiseRotations)
 
void rotate90To (ofPixels_< PixelType > &dst, int nClockwiseRotations) const
 
void mirrorTo (ofPixels_< PixelType > &dst, bool vertically, bool horizontal) const
 
void mirror (bool vertically, bool horizontal)
 Mirror the pixels across the vertical and/or horizontal axis.
 
bool resize (size_t dstWidth, size_t dstHeight, ofInterpolationMethod interpMethod=OF_INTERPOLATE_NEAREST_NEIGHBOR)
 Resize the ofPixels instance to the dstHeight and dstWidth.
 
bool resizeTo (ofPixels_< PixelType > &dst, ofInterpolationMethod interpMethod=OF_INTERPOLATE_NEAREST_NEIGHBOR) const
 Resize the ofPixels instance to the size of the ofPixels object passed in dst.
 
bool pasteInto (ofPixels_< PixelType > &dst, size_t x, size_t y) const
 Paste the ofPixels object into another ofPixels object at the specified index, copying data from the ofPixels that the method is being called on to the ofPixels object at &dst. If the data being copied doesn't fit into the destination then the image is cropped.
 
bool blendInto (ofPixels_< PixelType > &dst, size_t x, size_t y) const
 
void swapRgb ()
 Swaps the R and B channels of an image, leaving the G and A channels as is.
 
Pixels Access
PixelType * getData ()
 Retrieves pixel data from the ofPixel object.
 
const PixelType * getData () const
 
 OF_DEPRECATED_MSG ("Use getData instead", PixelType *getPixels())
 
 OF_DEPRECATED_MSG ("Use getData instead", const PixelType *getPixels() const)
 
size_t getPixelIndex (size_t x, size_t y) const
 Get the pixel index at a x,y position.
 
ofColor_< PixelType > getColor (size_t x, size_t y) const
 Get the color at a x,y position.
 
ofColor_< PixelType > getColor (size_t index) const
 Get the color at a specific index.
 
void setColor (size_t x, size_t y, const ofColor_< PixelType > &color)
 Set the color of the pixel at the x,y location.
 
void setColor (size_t index, const ofColor_< PixelType > &color)
 Set the color of the pixel at a specific index.
 
void setColor (const ofColor_< PixelType > &color)
 Set the color of all pixels.
 
const PixelType & operator[] (size_t pos) const
 Provides access to each channel of each pixel. If you have RGB pixel data, then you'll have 3 values for each pixel, if you have RGBA, you'll have 4.
 
PixelType & operator[] (size_t pos)
 
Getters
size_t getWidth () const
 Get the width of the pixel array.
 
size_t getHeight () const
 Get the height of the pixel array.
 
size_t getBytesPerPixel () const
 Get the number of bytes per pixel.
 
size_t getBitsPerPixel () const
 Get number of bits per pixel.
 
size_t getBytesPerChannel () const
 Get how large each channel of a pixel is.
 
size_t getBitsPerChannel () const
 Get how large each channel of a pixels is.
 
size_t getBytesStride () const
 
size_t getNumChannels () const
 Get the number of channels that the ofPixels object contains. RGB is 3 channels, RGBA is 4, and grayscale is 1.
 
size_t getTotalBytes () const
 
size_t getNumPlanes () const
 
ofPixels_< PixelType > getPlane (size_t plane)
 
ofPixels_< PixelType > getChannel (size_t channel) const
 Get all values of one channel.
 
ofPixelFormat getPixelFormat () const
 
size_t size () const
 Get the number of values that the ofPixels object contains, so an RGB data 400x400 would be 480,000, whereas RGBA data of the same dimensions would be 640,000.
 
ofImageType getImageType () const
 Get the type of the image.
 

Iterator

typedef PixelType * iterator
 
typedef const PixelType * const_iterator
 
typedef PixelType * reverse_iterator
 
typedef const PixelType * const_reverse_iterator
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 

Setters

void setChannel (size_t channel, const ofPixels_< PixelType > channelPixels)
 Set all the pixel data for a single channel, for instance, the Red pixel values, from an ofPixels object assumed to be a grayscale representation of the data that should go into that one channel.
 
void setImageType (ofImageType imageType)
 Changes the image type for the ofPixels object.
 
void setNumChannels (size_t numChannels)
 
static size_t pixelBitsFromPixelFormat (ofPixelFormat format)
 
static size_t bytesFromPixelFormat (size_t w, size_t h, ofPixelFormat format)
 

Detailed Description

template<typename PixelType>
class ofPixels_< PixelType >

A class representing a collection of pixels.

Member Typedef Documentation

◆ const_iterator

template<typename PixelType >
typedef const PixelType* ofPixels_< PixelType >::const_iterator

◆ const_reverse_iterator

template<typename PixelType >
typedef const PixelType* ofPixels_< PixelType >::const_reverse_iterator

◆ iterator

template<typename PixelType >
typedef PixelType* ofPixels_< PixelType >::iterator

◆ reverse_iterator

template<typename PixelType >
typedef PixelType* ofPixels_< PixelType >::reverse_iterator

Constructor & Destructor Documentation

◆ ofPixels_() [1/4]

template<typename PixelType >
ofPixels_< PixelType >::ofPixels_ ( )

◆ ~ofPixels_()

template<typename PixelType >
ofPixels_< PixelType >::~ofPixels_ ( )

◆ ofPixels_() [2/4]

template<typename PixelType >
ofPixels_< PixelType >::ofPixels_ ( const ofPixels_< PixelType > &  mom)

◆ ofPixels_() [3/4]

template<typename PixelType >
ofPixels_< PixelType >::ofPixels_ ( ofPixels_< PixelType > &&  mom)

◆ ofPixels_() [4/4]

template<typename PixelType >
template<typename SrcType >
ofPixels_< PixelType >::ofPixels_ ( const ofPixels_< SrcType > &  mom)

Member Function Documentation

◆ allocate() [1/3]

template<typename PixelType >
void ofPixels_< PixelType >::allocate ( size_t  w,
size_t  h,
ofImageType  imageType 
)

Allocates space for pixel data.

The imageType can be one of the following:

OF_IMAGE_GRAYSCALE
OF_IMAGE_COLOR
OF_IMAGE_COLOR_ALPHA
Parameters
wWidth of pixel array
hHeight of pixel array
imageTypeofImageType defining number of channels per pixel

◆ allocate() [2/3]

template<typename PixelType >
void ofPixels_< PixelType >::allocate ( size_t  w,
size_t  h,
ofPixelFormat  pixelFormat 
)

Allocates space for pixel data.

The pixelFormat can be one of the following:

OF_PIXELS_RGB
OF_PIXELS_RGBA
OF_PIXELS_BGRA
OF_PIXELS_MONO
Parameters
wWidth of pixel array
hHeight of pixel array
pixelFormatofPixelFormat defining number of channels per pixel

◆ allocate() [3/3]

template<typename PixelType >
void ofPixels_< PixelType >::allocate ( size_t  w,
size_t  h,
size_t  channels 
)

Allocates space for pixel data.

Parameters
wWidth of pixel array
hHeight of pixel array
channelsNumber of channels per pixel

◆ begin() [1/2]

template<typename PixelType >
ofPixels_< PixelType >::iterator ofPixels_< PixelType >::begin ( )
inline

◆ begin() [2/2]

template<typename PixelType >
ofPixels_< PixelType >::const_iterator ofPixels_< PixelType >::begin ( ) const
inline

◆ blendInto()

template<typename PixelType >
bool ofPixels_< PixelType >::blendInto ( ofPixels_< PixelType > &  dst,
size_t  x,
size_t  y 
) const

◆ bytesFromPixelFormat()

template<typename PixelType >
size_t ofPixels_< PixelType >::bytesFromPixelFormat ( size_t  w,
size_t  h,
ofPixelFormat  format 
)
static

◆ clear()

template<typename PixelType >
void ofPixels_< PixelType >::clear ( )

Clear all the data from the ofPixels objects. After calling this you'll need to allocate() the ofPixels object again to use it.

◆ crop()

template<typename PixelType >
void ofPixels_< PixelType >::crop ( size_t  x,
size_t  y,
size_t  width,
size_t  height 
)

Crop the pixels to a new width and height.

As a word of caution this reallocates memory and can be a bit expensive if done a lot.

◆ cropTo()

template<typename PixelType >
void ofPixels_< PixelType >::cropTo ( ofPixels_< PixelType > &  toPix,
size_t  x,
size_t  y,
size_t  width,
size_t  height 
) const

Crop the pixels into the ofPixels reference passed in by toPix. at thexandy` and width the new width and height.

As a word of caution this reallocates memory and can be a bit expensive if done a lot.

◆ end() [1/2]

template<typename PixelType >
ofPixels_< PixelType >::iterator ofPixels_< PixelType >::end ( )
inline

◆ end() [2/2]

template<typename PixelType >
ofPixels_< PixelType >::const_iterator ofPixels_< PixelType >::end ( ) const
inline

◆ getBitsPerChannel()

template<typename PixelType >
size_t ofPixels_< PixelType >::getBitsPerChannel ( ) const

Get how large each channel of a pixels is.

ofPixels objects that store pixel data as unsigned char are smaller than ofPixels objects that store pixel data as 'float`.

Note
This returns bits, not bytes, so you should see ofPixels<float> return 32 and ofPixels<unsigned char> return 8.

◆ getBitsPerPixel()

template<typename PixelType >
size_t ofPixels_< PixelType >::getBitsPerPixel ( ) const

Get number of bits per pixel.

If you have RGB pixel data, this will return 24, if you have RGBA, you'll have 32, if you have grayscale, this will return 8.

◆ getBytesPerChannel()

template<typename PixelType >
size_t ofPixels_< PixelType >::getBytesPerChannel ( ) const

Get how large each channel of a pixel is.

ofPixels objects that store pixel data as unsigned char are smaller than ofPixels objects that store pixel data as floats.

Note
This returns bytes, not bits, so you should see ofPixels<float> return 4 and ofPixels<unsigned char> return 1.

◆ getBytesPerPixel()

template<typename PixelType >
size_t ofPixels_< PixelType >::getBytesPerPixel ( ) const

Get the number of bytes per pixel.

◆ getBytesStride()

template<typename PixelType >
size_t ofPixels_< PixelType >::getBytesStride ( ) const

◆ getChannel()

template<typename PixelType >
ofPixels_< PixelType > ofPixels_< PixelType >::getChannel ( size_t  channel) const

Get all values of one channel.

For instance, the Red pixel values, from the ofPixels object, this gives you a grayscale representation of the specific channel

// Get red pixels
ofPixels rpix = pix.getChannel(0);
// Get green pixels
ofPixels gpix = pix.getChannel(1);
// Get blue pixels
ofPixels bpix = pix.getChannel(2);
ofPixels_< PixelType > getChannel(size_t channel) const
Get all values of one channel.
Definition ofPixels.cpp:1002

◆ getColor() [1/2]

template<typename PixelType >
ofColor_< PixelType > ofPixels_< PixelType >::getColor ( size_t  index) const

Get the color at a specific index.

◆ getColor() [2/2]

template<typename PixelType >
ofColor_< PixelType > ofPixels_< PixelType >::getColor ( size_t  x,
size_t  y 
) const

Get the color at a x,y position.

◆ getData() [1/2]

template<typename PixelType >
PixelType * ofPixels_< PixelType >::getData ( )

Retrieves pixel data from the ofPixel object.

Returns
A raw pointer to the pixel data.

◆ getData() [2/2]

template<typename PixelType >
const PixelType * ofPixels_< PixelType >::getData ( ) const

◆ getHeight()

template<typename PixelType >
size_t ofPixels_< PixelType >::getHeight ( ) const

Get the height of the pixel array.

◆ getImageType()

template<typename PixelType >
ofImageType ofPixels_< PixelType >::getImageType ( ) const

Get the type of the image.

Returns
One of the following types: OF_IMAGE_GRAYSCALE, OF_IMAGE_COLOR, OF_IMAGE_COLOR_ALPHA

◆ getNumChannels()

template<typename PixelType >
size_t ofPixels_< PixelType >::getNumChannels ( ) const

Get the number of channels that the ofPixels object contains. RGB is 3 channels, RGBA is 4, and grayscale is 1.

◆ getNumPlanes()

template<typename PixelType >
size_t ofPixels_< PixelType >::getNumPlanes ( ) const

◆ getPixelFormat()

template<typename PixelType >
ofPixelFormat ofPixels_< PixelType >::getPixelFormat ( ) const

◆ getPixelIndex()

template<typename PixelType >
size_t ofPixels_< PixelType >::getPixelIndex ( size_t  x,
size_t  y 
) const

Get the pixel index at a x,y position.

size_t ind = pix.getPixelIndex(mouseX, mouseY);
pix.setPixel(ind, yellow);
static const ofColor_< unsigned char > yellow
Definition ofColor.h:595

◆ getPlane()

template<typename PixelType >
ofPixels_< PixelType > ofPixels_< PixelType >::getPlane ( size_t  plane)

◆ getTotalBytes()

template<typename PixelType >
size_t ofPixels_< PixelType >::getTotalBytes ( ) const

◆ getWidth()

template<typename PixelType >
size_t ofPixels_< PixelType >::getWidth ( ) const

Get the width of the pixel array.

◆ isAllocated()

template<typename PixelType >
bool ofPixels_< PixelType >::isAllocated ( ) const

Get whether memory has been allocated for an ofPixels object or not.

Many operations like copying pixels, etc, automatically allocate the memory needed, but it's sometimes good to check.

◆ mirror()

template<typename PixelType >
void ofPixels_< PixelType >::mirror ( bool  vertically,
bool  horizontal 
)

Mirror the pixels across the vertical and/or horizontal axis.

Parameters
verticallySet to true to mirror vertically
horizontalSet to true to mirror horizontal

◆ mirrorTo()

template<typename PixelType >
void ofPixels_< PixelType >::mirrorTo ( ofPixels_< PixelType > &  dst,
bool  vertically,
bool  horizontal 
) const

◆ OF_DEPRECATED_MSG() [1/2]

template<typename PixelType >
ofPixels_< PixelType >::OF_DEPRECATED_MSG ( "Use getData instead"  ,
const PixelType *getPixels() const   
)

◆ OF_DEPRECATED_MSG() [2/2]

template<typename PixelType >
ofPixels_< PixelType >::OF_DEPRECATED_MSG ( "Use getData instead"  ,
PixelType *  getPixels() 
)

◆ operator=() [1/3]

template<typename PixelType >
ofPixels_< PixelType > & ofPixels_< PixelType >::operator= ( const ofPixels_< PixelType > &  mom)

◆ operator=() [2/3]

template<typename PixelType >
template<typename SrcType >
ofPixels_< PixelType > & ofPixels_< PixelType >::operator= ( const ofPixels_< SrcType > &  mom)

◆ operator=() [3/3]

template<typename PixelType >
ofPixels_< PixelType > & ofPixels_< PixelType >::operator= ( ofPixels_< PixelType > &&  mom)

◆ operator[]() [1/2]

template<typename PixelType >
PixelType & ofPixels_< PixelType >::operator[] ( size_t  pos)

◆ operator[]() [2/2]

template<typename PixelType >
const PixelType & ofPixels_< PixelType >::operator[] ( size_t  pos) const

Provides access to each channel of each pixel. If you have RGB pixel data, then you'll have 3 values for each pixel, if you have RGBA, you'll have 4.

◆ pasteInto()

template<typename PixelType >
bool ofPixels_< PixelType >::pasteInto ( ofPixels_< PixelType > &  dst,
size_t  x,
size_t  y 
) const

Paste the ofPixels object into another ofPixels object at the specified index, copying data from the ofPixels that the method is being called on to the ofPixels object at &dst. If the data being copied doesn't fit into the destination then the image is cropped.

◆ pixelBitsFromPixelFormat()

template<typename PixelType >
size_t ofPixels_< PixelType >::pixelBitsFromPixelFormat ( ofPixelFormat  format)
static

◆ rbegin() [1/2]

template<typename PixelType >
ofPixels_< PixelType >::reverse_iterator ofPixels_< PixelType >::rbegin ( )
inline

◆ rbegin() [2/2]

template<typename PixelType >
ofPixels_< PixelType >::const_reverse_iterator ofPixels_< PixelType >::rbegin ( ) const
inline

◆ rend() [1/2]

template<typename PixelType >
ofPixels_< PixelType >::reverse_iterator ofPixels_< PixelType >::rend ( )
inline

◆ rend() [2/2]

template<typename PixelType >
ofPixels_< PixelType >::const_reverse_iterator ofPixels_< PixelType >::rend ( ) const
inline

◆ resize()

template<typename PixelType >
bool ofPixels_< PixelType >::resize ( size_t  dstWidth,
size_t  dstHeight,
ofInterpolationMethod  interpMethod = OF_INTERPOLATE_NEAREST_NEIGHBOR 
)

Resize the ofPixels instance to the dstHeight and dstWidth.

The options for the interpolation methods are as follows:

OF_INTERPOLATE_NEAREST_NEIGHBOR
OF_INTERPOLATE_BILINEAR
OF_INTERPOLATE_BICUBIC 

◆ resizeTo()

template<typename PixelType >
bool ofPixels_< PixelType >::resizeTo ( ofPixels_< PixelType > &  dst,
ofInterpolationMethod  interpMethod = OF_INTERPOLATE_NEAREST_NEIGHBOR 
) const

Resize the ofPixels instance to the size of the ofPixels object passed in dst.

The options for the interpolation methods are as follows:

OF_INTERPOLATE_NEAREST_NEIGHBOR
OF_INTERPOLATE_BILINEAR
OF_INTERPOLATE_BICUBIC 

◆ rotate90()

template<typename PixelType >
void ofPixels_< PixelType >::rotate90 ( int  nClockwiseRotations)

◆ rotate90To()

template<typename PixelType >
void ofPixels_< PixelType >::rotate90To ( ofPixels_< PixelType > &  dst,
int  nClockwiseRotations 
) const

◆ set() [1/2]

template<typename PixelType >
void ofPixels_< PixelType >::set ( PixelType  val)

◆ set() [2/2]

template<typename PixelType >
void ofPixels_< PixelType >::set ( size_t  channel,
PixelType  val 
)

◆ setChannel()

template<typename PixelType >
void ofPixels_< PixelType >::setChannel ( size_t  channel,
const ofPixels_< PixelType >  channelPixels 
)

Set all the pixel data for a single channel, for instance, the Red pixel values, from an ofPixels object assumed to be a grayscale representation of the data that should go into that one channel.

◆ setColor() [1/3]

template<typename PixelType >
void ofPixels_< PixelType >::setColor ( const ofColor_< PixelType > &  color)

Set the color of all pixels.

◆ setColor() [2/3]

template<typename PixelType >
void ofPixels_< PixelType >::setColor ( size_t  index,
const ofColor_< PixelType > &  color 
)

Set the color of the pixel at a specific index.

◆ setColor() [3/3]

template<typename PixelType >
void ofPixels_< PixelType >::setColor ( size_t  x,
size_t  y,
const ofColor_< PixelType > &  color 
)

Set the color of the pixel at the x,y location.

◆ setFromAlignedPixels() [1/3]

template<typename PixelType >
void ofPixels_< PixelType >::setFromAlignedPixels ( const PixelType *  newPixels,
size_t  width,
size_t  height,
ofPixelFormat  pixelFormat,
size_t  stride 
)

◆ setFromAlignedPixels() [2/3]

template<typename PixelType >
void ofPixels_< PixelType >::setFromAlignedPixels ( const PixelType *  newPixels,
size_t  width,
size_t  height,
ofPixelFormat  pixelFormat,
std::vector< size_t >  strides 
)

used to copy i420 pixels from gstreamer when (width % 4) != 0

◆ setFromAlignedPixels() [3/3]

template<typename PixelType >
void ofPixels_< PixelType >::setFromAlignedPixels ( const PixelType *  newPixels,
size_t  width,
size_t  height,
size_t  channels,
size_t  stride 
)

◆ setFromExternalPixels() [1/2]

template<typename PixelType >
void ofPixels_< PixelType >::setFromExternalPixels ( PixelType *  newPixels,
size_t  w,
size_t  h,
ofPixelFormat  pixelFormat 
)

◆ setFromExternalPixels() [2/2]

template<typename PixelType >
void ofPixels_< PixelType >::setFromExternalPixels ( PixelType *  newPixels,
size_t  w,
size_t  h,
size_t  channels 
)

◆ setFromPixels() [1/3]

template<typename PixelType >
void ofPixels_< PixelType >::setFromPixels ( const PixelType *  newPixels,
size_t  w,
size_t  h,
ofImageType  type 
)

◆ setFromPixels() [2/3]

template<typename PixelType >
void ofPixels_< PixelType >::setFromPixels ( const PixelType *  newPixels,
size_t  w,
size_t  h,
ofPixelFormat  pixelFormat 
)

◆ setFromPixels() [3/3]

template<typename PixelType >
void ofPixels_< PixelType >::setFromPixels ( const PixelType *  newPixels,
size_t  w,
size_t  h,
size_t  channels 
)

◆ setImageType()

template<typename PixelType >
void ofPixels_< PixelType >::setImageType ( ofImageType  imageType)

Changes the image type for the ofPixels object.

Parameters
imageTypeCan be one of the following: OF_IMAGE_GRAYSCALE, OF_IMAGE_COLOR, OF_IMAGE_COLOR_ALPHA

◆ setNumChannels()

template<typename PixelType >
void ofPixels_< PixelType >::setNumChannels ( size_t  numChannels)

◆ size()

template<typename PixelType >
size_t ofPixels_< PixelType >::size ( ) const

Get the number of values that the ofPixels object contains, so an RGB data 400x400 would be 480,000, whereas RGBA data of the same dimensions would be 640,000.

◆ swap()

template<typename PixelType >
void ofPixels_< PixelType >::swap ( ofPixels_< PixelType > &  pix)

◆ swapRgb()

template<typename PixelType >
void ofPixels_< PixelType >::swapRgb ( )

Swaps the R and B channels of an image, leaving the G and A channels as is.


The documentation for this class was generated from the following files:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/app/ofAppGLFWWindow.h
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/graphics/ofPixels.h
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/graphics/ofPixels.cpp