예제 #1
0
        public override ResourceData FromResource(ResourceLang lang, byte[] data)
        {
            TiffImageResourceData rd;

            if (TiffImageResourceData.TryCreate(lang, data, out rd))
            {
                return(rd);
            }
            return(null);
        }
예제 #2
0
        public static Boolean TryCreate(ResourceLang lang, Byte[] data, out TiffImageResourceData typed)
        {
            typed = null;

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

            Image image;

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

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

            return(true);
        }