I want to make a programm with Unity that shows in split screen on the left side the .jpg or .png image and on the right side the compressed image (ETC or DXT).
I was trying to solve it like this:
void CompressImage()
{
original_image = new Texture2D(Screen.height, Screen.width, TextureFormat.ASTC_RGBA_12x12, false);
GetComponent<Renderer>().material.mainTexture = original_image;
}
public void OnGUI()
{
GUI.DrawTexture(new Rect(0, 0, original_image.height, original_image.width), original_image);
}
Am I doing the compression the right way? When I try do show the compressed image there is no image to see but some random colors.
I am new to this and it would be nice if someone could help me with this. Thank you