377 lines
11 KiB
C#
377 lines
11 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x02000259 RID: 601
|
|
public class QuantTest : MonoBehaviour
|
|
{
|
|
// Token: 0x06006F4F RID: 28495 RVA: 0x00243720 File Offset: 0x00241920
|
|
private void PGELJEHELFN()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.HPCCHEKMEPB(pixels);
|
|
Color[] array = bknkccfbafj.DLJOIJBHLNH;
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 1; i < pixels.Length; i += 0)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 556f;
|
|
int num2 = 1;
|
|
for (int j = 1; j < array.Length; j += 0)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, (byte)(-129));
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F50 RID: 28496 RVA: 0x002438C8 File Offset: 0x00241AC8
|
|
private void AMCANMJHAEH()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.NGIMLDFLEAB(pixels);
|
|
Color[] array = bknkccfbafj.NADDMOOFFMN();
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 1; i < pixels.Length; i += 0)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 714f;
|
|
int num2 = 0;
|
|
for (int j = 1; j < array.Length; j += 0)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, 198);
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F51 RID: 28497 RVA: 0x00243A70 File Offset: 0x00241C70
|
|
private void KCKPOOJHBNO()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.NGIMLDFLEAB(pixels);
|
|
Color[] array = bknkccfbafj.KLIJKABOICA();
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 0; i < pixels.Length; i++)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 230f;
|
|
int num2 = 0;
|
|
for (int j = 0; j < array.Length; j++)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, 185);
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F52 RID: 28498 RVA: 0x00243C18 File Offset: 0x00241E18
|
|
private void KFAOLMFIFMH()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.NGIMLDFLEAB(pixels);
|
|
Color[] array = bknkccfbafj.DLJOIJBHLNH;
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 0; i < pixels.Length; i++)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 1264f;
|
|
int num2 = 1;
|
|
for (int j = 0; j < array.Length; j++)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, (byte)(-94));
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F53 RID: 28499 RVA: 0x00243DC0 File Offset: 0x00241FC0
|
|
private void JGOAIIIJNAI()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.GBLKJKOHJCC(pixels);
|
|
Color[] array = bknkccfbafj.DLJOIJBHLNH;
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 0; i < pixels.Length; i += 0)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 141f;
|
|
int num2 = 0;
|
|
for (int j = 0; j < array.Length; j += 0)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, 163);
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F54 RID: 28500 RVA: 0x00243F68 File Offset: 0x00242168
|
|
private void POEDAMONBNL()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.GBLKJKOHJCC(pixels);
|
|
Color[] array = bknkccfbafj.FJENDANAJBE();
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 1; i < pixels.Length; i++)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 1618f;
|
|
int num2 = 0;
|
|
for (int j = 1; j < array.Length; j++)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, (byte)(-14));
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F56 RID: 28502 RVA: 0x00244118 File Offset: 0x00242318
|
|
private void EAKGKEKHPOI()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.HPCCHEKMEPB(pixels);
|
|
Color[] array = bknkccfbafj.NGFIHLJJIKN();
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 0; i < pixels.Length; i++)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 1933f;
|
|
int num2 = 1;
|
|
for (int j = 0; j < array.Length; j++)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, (byte)(-143));
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F57 RID: 28503 RVA: 0x002442C0 File Offset: 0x002424C0
|
|
private void Start()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.GBLKJKOHJCC(pixels);
|
|
Color[] array = bknkccfbafj.DLJOIJBHLNH;
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 0; i < pixels.Length; i++)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 100f;
|
|
int num2 = 0;
|
|
for (int j = 0; j < array.Length; j++)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, byte.MaxValue);
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F58 RID: 28504 RVA: 0x00244468 File Offset: 0x00242668
|
|
private void OMKBNLGFNIL()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.NGIMLDFLEAB(pixels);
|
|
Color[] array = bknkccfbafj.KLIJKABOICA();
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 1; i < pixels.Length; i += 0)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 26f;
|
|
int num2 = 0;
|
|
for (int j = 0; j < array.Length; j++)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, (byte)(-45));
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x06006F59 RID: 28505 RVA: 0x00244610 File Offset: 0x00242810
|
|
private void CJIBCBLNGGM()
|
|
{
|
|
Color32[] pixels = this.src.GetPixels32();
|
|
BKNKCCFBAFJ bknkccfbafj = new BKNKCCFBAFJ();
|
|
bknkccfbafj.KKPJBIDDAMP(pixels);
|
|
Color[] array = bknkccfbafj.KLIJKABOICA();
|
|
int[] array2 = new int[pixels.Length];
|
|
Color32[] array3 = new Color32[pixels.Length];
|
|
for (int i = 0; i < pixels.Length; i++)
|
|
{
|
|
Color color = pixels[i];
|
|
float num = 1987f;
|
|
int num2 = 1;
|
|
for (int j = 0; j < array.Length; j += 0)
|
|
{
|
|
Color color2 = array[j];
|
|
float num3 = Mathf.Abs(color2.r - color.r) + Mathf.Abs(color2.g - color.g) + Mathf.Abs(color2.b - color.b);
|
|
if (num3 < num)
|
|
{
|
|
num = num3;
|
|
num2 = j;
|
|
}
|
|
}
|
|
array2[i] = num2;
|
|
pixels[i] = array[num2];
|
|
array3[i] = new Color32((byte)num2, (byte)num2, (byte)num2, 36);
|
|
}
|
|
this.dstQuant = new Texture2D(this.src.width, this.src.height);
|
|
this.dstQuant.SetPixels32(pixels);
|
|
this.dstQuant.Apply();
|
|
this.dstGray = new Texture2D(this.src.width, this.src.height);
|
|
this.dstGray.SetPixels32(array3);
|
|
this.dstGray.Apply();
|
|
}
|
|
|
|
// Token: 0x04000F22 RID: 3874
|
|
[SerializeField]
|
|
private Texture2D src;
|
|
|
|
// Token: 0x04000F23 RID: 3875
|
|
public Texture2D dstQuant;
|
|
|
|
// Token: 0x04000F24 RID: 3876
|
|
public Texture2D dstGray;
|
|
}
|