Beispiel #1
0
        public static bool TryCreate(ResourceLang lang, byte[] data, out TiffImageResourceData typed)
        {
            typed = null;

            if (!HasTiffSignature(data))
            {
                return(false);
            }

            if (!TryCreateImage(data, out var image))
            {
                return(false);
            }

            typed = new TiffImageResourceData(image, lang, data);

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