I'm using Azure functions for a project involving text recognition. I originally converted the byte[] to an image, and then cropped the image to focus on the parts I wanted using libraries from System.Drawing. However when moving to Azure it appears that it doesn't support System.Drawing. I still need to crop my image however, but I don't know how to directly crop the byte[] in C# without using any libraries like Bitmap/Rectangle/DrawImage etc.
How can I given a byte[] and the x/y/width/height of the area I want to crop get a new byte[] that is the cropped version of the old one?