public override void Transform()
 {
     for (var i = 0; i < Length; i += ByteCount)
     {
         var yuvColor = new YuvColor(this[i + RedIndex], this[i + GreenIndex], this[i], ColorSpaceType.RGB);
         this[i] = componentValue;
         this[i + GreenIndex] = yuvColor.U;
         this[i + RedIndex]   = yuvColor.Y;
     }
 }
Ejemplo n.º 2
0
 public override void Transform()
 {
     for (var i = 0; i < Length; i += ByteCount)
     {
         var yuvColor = new YuvColor(this[i + YIndex], this[i + UIndex], this[i], ColorSpaceType.YUV);
         this[i]          = yuvColor.Blue;
         this[i + UIndex] = yuvColor.Green;
         this[i + YIndex] = yuvColor.Red;
     }
 }
Ejemplo n.º 3
0
 public override void Transform()
 {
     for (var i = 0; i < Length; i += ByteCount)
     {
         var yuvColor = new YuvColor(this[i + RedIndex], this[i + GreenIndex], this[i], ColorSpaceType.RGB);
         var x        = this[i] - yuvColor.Y;
         var value    = (x < 0) ? (byte)(Byte.MaxValue + x) : (byte)x;
         this[i] = value;
         this[i + GreenIndex] = componentValue;
         this[i + RedIndex]   = componentValue;
     }
 }