public void Astc_MultiPartition_Decoding_Successful() { var block = new byte[] { 0b01000010, 0b00000000, 0b00000001, 0b11111110, 0b11111111, 0b00000001, 0b00000000, 0b11111110, 0b00000001, 0b00000000, 0b00000000, 0b00000000, 0b00011011, 0b01101100, 0b10110001, 0b11000110 }; var astcEncoder = new ASTC(4, 4, 1); var colors = astcEncoder.Load(block, 8).ToArray(); }
public void LoadASTC(string FileName) { DecompressedData.Clear(); TexName = STGenericTexture.SetNameFromPath(FileName); ASTC astc = new ASTC(); astc.Load(new FileStream(FileName, FileMode.Open)); MipCount = 0; TexWidth = (uint)astc.Width; TexHeight = (uint)astc.Height; DataBlockOutput.Add(astc.DataBlock); Format = astc.Format; }
public void LoadASTC(string FileName) { DecompressedData.Clear(); TexName = Path.GetFileNameWithoutExtension(FileName); ASTC astc = new ASTC(); astc.Load(new FileStream(FileName, FileMode.Open)); MipCount = 0; TexWidth = (uint)astc.Width; TexHeight = (uint)astc.Height; DataBlockOutput.Add(astc.DataBlock); Format = TextureData.GenericToBntxSurfaceFormat(astc.Format); }
/* '============================================================================== ' Method: RestoreIcon ' ' Description: Restore any icon you removed with Hide Method. '============================================================================== */ private void RestoreIcon(ASTC.TrayIconInfo TrayIcon) { const int NIF_TIP = 0x4; const int NIF_ICON = 0x2; const int NIM_ADD = 0x0; const int NIF_MESSAGE = 0x1; Boolean Res; ShellNotify ShellIcon = new ShellNotify(); ShellNotify.NOTIFYICONDATA TrayI = new ShellNotify.NOTIFYICONDATA() ; if (TrayIcon.hwnd != 0) { TrayI.cbSize = Marshal.SizeOf(TrayI); TrayI.hwnd = TrayIcon.hwnd; TrayI.uID = TrayIcon.uId; TrayI.hIcon = TrayIcon.hIcon; TrayI.szTip = TrayIcon.ToolTip; TrayI.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE; TrayI.uCallbackMessage = TrayIcon.ucallbackMessage; //Restore the icon Res = ShellNotify.Shell_NotifyIcon(NIM_ADD, ref TrayI); MSFlexGrid1.Clear(); FillFlexGrid(); } }