0

I'm trying to get 3 RGB arrays of an image using ASP.NET C#, i have no idea how to do this. I get the imagen from input type file. There is the code.

    [HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult Create([Bind(Include = "inFile")] tblImagen tblImagen, HttpPostedFileBase imagen)
    {
        if (imagen != null && imagen.ContentLength > 0)
        {
            byte[] imageData = null;
            using (var binaryreader = new BinaryReader(imagen.InputStream))
            {
                imageData = binaryreader.ReadBytes(imagen.ContentLength);
            }
    }
  • 1
    What framework are you using for image processing? If you are using `System.Drawing.Bitmap`, see [Getting RGB array from image in C#](https://stackoverflow.com/q/4747428/3744182). – dbc Dec 17 '21 at 18:30
  • Take a look of mi answer please – Sebas García Dec 17 '21 at 20:04

0 Answers0