[Mono-list] How to read a JPG into a 2D array of colors?
mcd40 at cam.ac.uk
Sun Jun 19 06:04:34 EDT 2011
I don't use Unity but with other game engines you can, at runtime, load the
jpg into a 2D texture and then work with it from there. Having done some
searching it appears the class for doing the loading is "WWW" where you will
use "file://" as the start of the URL. It appears you can then do things
like GetPixels on the Texture2D object to get the colour values or SetPixels
to set them afterwards.
This would hopefully be a cross platform solution and integrated with unity.
View this message in context: http://mono.1490590.n4.nabble.com/How-to-read-a-JPG-into-a-2D-array-of-colors-tp3604716p3609037.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list