54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Internal;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000392 RID: 914
|
|
public static class ImageConversion
|
|
{
|
|
// Token: 0x06003652 RID: 13906
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern byte[] EncodeToPNG(this Texture2D tex);
|
|
|
|
// Token: 0x06003653 RID: 13907
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern byte[] EncodeToJPG(this Texture2D tex, int quality);
|
|
|
|
// Token: 0x06003654 RID: 13908 RVA: 0x0005B1E8 File Offset: 0x000593E8
|
|
public static byte[] EncodeToJPG(this Texture2D tex)
|
|
{
|
|
return tex.EncodeToJPG(75);
|
|
}
|
|
|
|
// Token: 0x06003655 RID: 13909
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern byte[] EncodeToEXR(this Texture2D tex, [DefaultValue("Texture2D.EXRFlags.None")] Texture2D.EXRFlags flags);
|
|
|
|
// Token: 0x06003656 RID: 13910 RVA: 0x0005B208 File Offset: 0x00059408
|
|
[ExcludeFromDocs]
|
|
public static byte[] EncodeToEXR(this Texture2D tex)
|
|
{
|
|
Texture2D.EXRFlags exrflags = Texture2D.EXRFlags.None;
|
|
return tex.EncodeToEXR(exrflags);
|
|
}
|
|
|
|
// Token: 0x06003657 RID: 13911
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public static extern bool LoadImage(this Texture2D tex, byte[] data, [DefaultValue("false")] bool markNonReadable);
|
|
|
|
// Token: 0x06003658 RID: 13912 RVA: 0x0005B228 File Offset: 0x00059428
|
|
[ExcludeFromDocs]
|
|
public static bool LoadImage(this Texture2D tex, byte[] data)
|
|
{
|
|
bool flag = false;
|
|
return tex.LoadImage(data, flag);
|
|
}
|
|
}
|
|
}
|