public override ResourceData FromResource(ResourceLang lang, byte[] data) { TiffImageResourceData rd; if (TiffImageResourceData.TryCreate(lang, data, out rd)) { return(rd); } return(null); }
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); }