refactor Texture2D convert

This commit is contained in:
Perfare
2020-03-24 06:41:58 +08:00
parent 5b96a29cca
commit f3a0bf505e
57 changed files with 15416 additions and 1333 deletions

View File

@ -73,6 +73,7 @@
<Compile Include="ShaderConverter.cs" />
<Compile Include="SpriteHelper.cs" />
<Compile Include="Texture2DConverter.cs" />
<Compile Include="Texture2DExtensions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AssetStudioFBX\AssetStudioFBX.vcxproj">
@ -83,6 +84,10 @@
<Project>{af56b63c-1764-41b7-9e60-8d485422ac3b}</Project>
<Name>AssetStudio</Name>
</ProjectReference>
<ProjectReference Include="..\Texture2DDecoder\Texture2DDecoder.vcxproj">
<Project>{57cff625-57ab-424a-9b6b-b5ed01282e92}</Project>
<Name>Texture2DDecoder</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
using System.Drawing;
namespace AssetStudio
{
public static class Texture2DExtensions
{
public static Bitmap ConvertToBitmap(this Texture2D m_Texture2D, bool flip)
{
var converter = new Texture2DConverter(m_Texture2D);
return converter.ConvertToBitmap(flip);
}
}
}