You have a structure that takes a byte array

byte[]

however, the size of that array depends on the image you are submitting (widthxheight)

So... how do you do

[MarshalAs(UnmanagedType.ByValArray, SizeConst = ???)]
public Byte[] ImageData;

Is the sizeconst a MUST HAVE when working with byte arrays being passed from C# to C dlls?

Edit
Report