Image size increase on loading in memory from local storage?

Hey, I’m loading a jpg Image from local storage in a rawImage variable. The actual size of image is 412kb but when it is loaded in memory its size raise 7.7mb. This is taking a lot of memory on iOS.
i have used the following code snippet to load the image.

Texture2D newTexture = new Texture2D(2, 2, TextureFormat.RGB24, false);
newTexture.anisoLevel = 1;
newTexture.filterMode = FilterMode.Bilinear;
newTexture.wrapMode = TextureWrapMode.Clamp;
_image.texture = newTexture;

Can anyone please help get out of this issue? Is there any way to apply compression to image or there is some other thing that I am missing?


You should use Texture2D.Compress. I have not tried this, but it should work. Other than that, there are not really any other options.