GetEtc1RasterData() public static method

public static GetEtc1RasterData ( byte imageData, Size size, int y, bool hasAlpha, Bitmap bmp, int outputOffset ) : void
imageData byte
size System.Drawing.Size
y int
hasAlpha bool
bmp System.Drawing.Bitmap
outputOffset int
return void
Esempio n. 1
0
        public Bitmap GetBitmap()
        {
            var bmp = new Bitmap(Width, Height);

            switch (TextureFormat)
            {
            case TextureFormat.Invalid:
                break;

            case TextureFormat.Etc1:
            case TextureFormat.Etc1A4:
                for (int y = 0; y < Height; y++)
                {
                    Etc.GetEtc1RasterData(Data, new Size(Width, Height), y, HasAlpha, bmp, 0);
                }
                break;

            default:
                GetPlainRasterData(bmp);
                break;
            }
            return(bmp);
        }
Esempio n. 2
0
        public byte[] GetRGBA()
        {
            var data = new byte[Width * Height * 4];

            switch (TextureFormat)
            {
            case TextureFormat.Invalid:
                break;

            case TextureFormat.Etc1:
            case TextureFormat.Etc1A4:
                for (int y = 0; y < Height; y++)
                {
                    Etc.GetEtc1RasterData(Data, new Size(Width, Height), y, HasAlpha, data, 0);
                }
                break;

            default:
                GetPlainRasterData(ref data);
                break;
            }
            return(data);
        }