public override ResourceData FromResource(ResourceLang lang, Byte[] data) { GifImageResourceData rd; if (GifImageResourceData.TryCreate(lang, data, out rd)) { return(rd); } return(null); }
private static ResourceData FromFile(Stream stream, String extension) { Byte[] data = GetAllBytesFromStream(stream); GifImageResourceData rd; if (GifImageResourceData.TryCreate(null, data, out rd)) { return(rd); } return(null); }
public override ResourceData FromFile(Stream stream, String extension, ResourceSource source) { Byte[] data = GetAllBytesFromStream(stream); GifImageResourceData rd; if (GifImageResourceData.TryCreate(null, data, out rd)) { return(rd); } return(null); }
internal static Boolean TryCreate(ResourceLang lang, Byte[] data, out GifImageResourceData typed) { // XN Resource Editor checks if the first few bytes are a GIF signature typed = null; if (!HasGifSignature(data)) { return(false); } Image image; if (!TryCreateImage(data, out image)) { return(false); } typed = new GifImageResourceData(image, lang, data); return(true); }