Exemplo n.º 1
0
        public static ImageSource Decode(byte[] data, TgaHeader tgaHeader, int size)
        {
            var imageDataOffset = RgbBufferDecoder.GetImageDataOffset(tgaHeader);

            var numberOfPixels = RgbBufferDecoder.GetStride(tgaHeader) * tgaHeader.Height;
            var imageBuffer    = data.Skip(imageDataOffset).Take(numberOfPixels).ToArray();

            return(RgbBufferDecoder.Decode(tgaHeader, imageBuffer, size));
        }
Exemplo n.º 2
0
        public static ImageSource Decode(byte[] data, TgaHeader tgaHeader, int size)
        {
            var imageBuffer = GetImageBuffer(data, tgaHeader);

            return(RgbBufferDecoder.Decode(tgaHeader, imageBuffer, size));
        }