Crop a PNG

I need to crop a PNG that I load from a file, and then save the cropped version.

I use the WWW to load the PNG into a Texture2D and that works fine.

And I can save the file again using the File class without any problems.

My problem is that I can’t figure out how to crop the Texture2D before saving it. Does anyone have any good ideas?

Just occurred to me that I can use GetPixels and SetPixels :sweat_smile: