/// <summary> /// Get Image from Raw Data /// </summary> /// <param name="data"></param> /// <param name="f">The FileFormat</param> /// <returns></returns> public static Image FromBytes(byte[] data, ImageFormat f) { var sel = new ImageFormatSelector(); var reader = sel.From(f); return(reader.Read(data)); }
/// <summary> /// Save the Image to specific FileFormat /// </summary> /// <param name="f"></param> /// <returns></returns> public byte[] Save(ImageFormat f) { var sel = new ImageFormatSelector(); var format = sel.From(f); return(format.Write(this)); }
/// <summary> /// Get Image from Raw Data /// </summary> /// <param name="data"></param> /// <returns></returns> public static Image FromBytes(byte[] data) { var sel = new ImageFormatSelector(); var reader = sel.From(data); return(reader.Read(data)); /*var format = _selector.From(data); * * return format.Read(data);*/ }