Exemple #1
0
        private void CheckForPalette(byte [] data)
        {
            PicDecoder decoder = new PicDecoder(data);

            if (decoder.hasPalette)
            {
                PalDecoder paldecoder = new PalDecoder(data, 6);
                palette = paldecoder.Palette;
            }
        }
Exemple #2
0
        /// <summary>
        /// Load and setup palette
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void loadPaletteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog2.ShowDialog() == DialogResult.OK)
            {
                string [] text = File.ReadAllLines(openFileDialog2.FileName);

                PalDecoder decoder = new PalDecoder(text);

                palette = decoder.Palette;

                if (SavedPic != null)
                {
                    ShowPic(SavedPic);
                }
            }
        }