mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-11 15:58:40 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
22 lines
431 B
C#
22 lines
431 B
C#
using Sandbox.Utility;
|
|
namespace Editor;
|
|
|
|
public static partial class EditorUtility
|
|
{
|
|
/// <summary>
|
|
/// Load a float bitmap. This is usually a png, tga, exr, psd
|
|
/// </summary>
|
|
public static FloatBitmap LoadBitmap( string filename )
|
|
{
|
|
var bm = FloatBitMap_t.Create();
|
|
|
|
if ( !bm.LoadFromFile( filename, FBMGammaType_t.FBM_GAMMA_LINEAR ) )
|
|
{
|
|
bm.Delete();
|
|
return default;
|
|
}
|
|
|
|
return new FloatBitmap( bm );
|
|
}
|
|
}
|