FasTC/IO/src/ImageWriter.cpp

8 lines
224 B
C++
Raw Normal View History

2012-10-20 22:22:29 +00:00
#include "ImageWriter.h"
uint32 ImageWriter::GetChannelForPixel(uint32 x, uint32 y, uint32 ch) {
uint32 bytesPerRow = GetWidth() * 4;
uint32 byteLocation = y * bytesPerRow + x*4 + ch;
return m_PixelData[byteLocation];
}