mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-14 02:54:16 -04:00
refactor Texture2D convert
This commit is contained in:
@ -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
13
AssetStudioUtility/Texture2DExtensions.cs
Normal file
13
AssetStudioUtility/Texture2DExtensions.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user