2 using System.Collections.Generic;
3 using System.ComponentModel;
5 using SiliconStudio.Paradox.Graphics;
6 using SiliconStudio.Core.Serialization;
7 using SiliconStudio.Core.Serialization.Assets;
8 using System.Threading.Tasks;
10 namespace SiliconStudio.BuildEngine
12 [Description(
"Import image")]
16 public override string Title {
get {
string title =
"Import Image ";
try { title += Path.GetFileName(SourcePath) ??
"[File]"; }
catch { title +=
"[INVALID PATH]"; }
return title; } }
23 using (var fileStream =
new FileStream(SourcePath,
FileMode.Open, FileAccess.Read))
25 image = Image.Load(fileStream);
27 assetManager.Save(Location, image);
30 return Task.FromResult(ResultStatus.Successful);
35 base.ComputeParameterHash(stream);
38 writer.Write(SourcePath);
39 writer.Write(Location);
49 return "Import image " + (SourcePath ??
"[File]") +
" > " + (Location ??
"[Location]");
Provides method to instantiate an image 1D/2D/3D supporting TextureArray and mipmaps on the CPU or to...
System.IO.FileMode FileMode
Implements SerializationStream as a binary writer.
override IEnumerable< ObjectUrl > GetInputFiles()
Gets the list of input files (that can be deduced without running the command, only from command para...
override string ToString()
override Task< ResultStatus > DoCommandOverride(ICommandContext commandContext)
The method to override containing the actual command code. It is called by the DoCommand function ...
override void ComputeParameterHash(Stream stream)