Exemplo n.º 1
0
        internal static bool TryCreate(ResourceLang lang, byte[] rawData, out BmpImageResourceData typed)
        {
            Dib dib;

            try { dib = new Dib(rawData); }
            catch (DibException)
            {
                typed = null;
                return(false);
            }

            typed = new BmpImageResourceData(dib, lang, rawData);

            return(true);
        }
Exemplo n.º 2
0
 public override ResourceData FromResource(ResourceLang lang, byte[] data)
 {
     return(BmpImageResourceData.TryCreate(lang, data, out var rd) ? rd : null);
 }