Exemplo n.º 1
0
        public Bitmap GetImage(int index, PLT0Node plt)
        {
            try
            {
                if (SharesData && SourceNode != this)
                {
                    return(SourceNode.GetImage(index, plt));
                }

                if (WorkingUncompressed != DataSource.Empty)
                {
                    if (plt != null)
                    {
                        return(TextureConverter.DecodeIndexed(
                                   (VoidPtr)CommonHeader + _headerLen, _width, _height, plt.Palette, index + 1, _format));
                    }
                    else
                    {
                        return(TextureConverter.Decode(
                                   (VoidPtr)CommonHeader + _headerLen, _width, _height, index + 1, _format));
                    }
                }
                else
                {
                    return(null);
                }
            }
            catch { return(null); }
        }
Exemplo n.º 2
0
        public Bitmap GetImage(int index)
        {
            PLT0Node plt = GetPaletteNode();

            return(SharesData ? SourceNode.GetImage(index, plt) : GetImage(index, plt));
        }