/// <summary> /// Gets a palette from a TileLayer palette /// </summary> /// <param name="Filepath">Location of the savestate file</param> /// <returns>Standard color palette</returns> public static ColorPalette From_TilelayerPalette(string Filepath) { if (string.IsNullOrEmpty(Filepath)) { throw new ArgumentException("Invalid filepath"); } var converter = new PaletteConverters.TileLayerPro(); return(converter.GetPalette(System.IO.File.ReadAllBytes(Filepath))); }
/// <summary> /// Gets a palette from a TileLayer palette /// </summary> /// <param name="DataStream">Stream containing the palette data</param> /// <returns>Standard color palette</returns> public static ColorPalette From_TilelayerPalette(Stream DataStream) { if (DataStream == null) { throw new ArgumentNullException(); } var converter = new PaletteConverters.TileLayerPro(); var alldata = new byte[DataStream.Length]; DataStream.Read(alldata, 0, alldata.Length); return(converter.GetPalette(alldata)); }
/// <summary> /// Gets a palette from a TileLayer palette /// </summary> /// <param name="DataStream">Stream containing the palette data</param> /// <returns>Standard color palette</returns> public static ColorPalette From_TilelayerPalette(Stream DataStream) { if (DataStream == null) throw new ArgumentNullException(); var converter = new PaletteConverters.TileLayerPro(); var alldata = new byte[DataStream.Length]; DataStream.Read(alldata, 0, alldata.Length); return converter.GetPalette(alldata); }
/// <summary> /// Gets a palette from a TileLayer palette /// </summary> /// <param name="Filepath">Location of the savestate file</param> /// <returns>Standard color palette</returns> public static ColorPalette From_TilelayerPalette(string Filepath) { if (string.IsNullOrEmpty(Filepath)) throw new ArgumentException("Invalid filepath"); var converter = new PaletteConverters.TileLayerPro(); return converter.GetPalette(System.IO.File.ReadAllBytes(Filepath)); }