bool pack(UByte& _b1, UByte& _b2) const
 {
   _b1 = utypeValue<UByte,  true>(storeR(), 5, 0)
       | utypeValue<UByte,  true>(storeG(), 3, 5);
   _b2 = utypeValue<UByte, false>(storeG(), 3, 3)
       | utypeValue<UByte,  true>(storeB(), 5, 3);
   return true;
 }
    bool pack(UByte& _b1, UByte& _b2, UByte& _b3) const
    {
      _b1 = utypeValue<UByte, true>(storeR(), 8, 0);
      _b2 = utypeValue<UByte, true>(storeG(), 8, 0);
      _b3 = utypeValue<UByte, true>(storeB(), 8, 0);

      return true;
    }
예제 #3
0
파일: tga.cpp 프로젝트: leofiao/SI_P2
void TGAImage::setG( int lod, int i, int j, int v )
{
	int w = getLODwidth(lod);
	storeG( lodData[lod] + BPP * ( j * w + i ), v );
}