0

I want to be able to input an image and get out an Array such as {{55,132,97},{55,125,97},} for an image, 1 Array per pixel

what I need help with is how would I go about this? I would prefer lua but I could also use C# and python

also what libraries or whatever they are called would I need?

  • Please specify what picture type BMP or JPG or other type. For BMP it is time consuming but can be done with binary read (have done it long ago in VB.Net) for compressed it will be more complicated and probably best option would be to convert to bitmap and then to read or to find a ready library. – Gergo Jul 18 '21 at 20:09
  • I would prefer a non compressed image and a common file format, I'm thinking PNG? –  Jul 18 '21 at 20:18
  • For PNG I would recommend not wasting time to crate the decoder from scratch. It supports compression and data structure is much more complicated than BMP. Check following question https://stackoverflow.com/questions/10127871/how-can-i-read-image-pixels-values-as-rgb-into-2d-array – Gergo Jul 18 '21 at 20:59

0 Answers0