public override void SetImageData(Bitmap bitmap, int ArrayLevel)
        {
            byte[] Data = BitmapExtension.ImageToByte(bitmap);
            Width  = (uint)bitmap.Width;
            Height = (uint)bitmap.Height;

            ImageData = DDSCompressor.EncodePixelBlock(Data, bitmap.Width, bitmap.Width, DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB);
        }
Ejemplo n.º 2
0
        public override byte[] GetImageData(int ArrayLevel = 0, int MipLevel = 0, int DepthLevel = 0)
        {
            if (TargaImage == null || TargaImage.Image == null)
            {
                return(new byte[0]);
            }

            return(BitmapExtension.ImageToByte(BitmapExtension.SwapBlueRedChannels(TargaImage.Image)));
        }