Possibly a very naive question, so please excuse me if so...
We are wrapping some Matlab functions in a C-callable DLL. The calling application already has images (as bitmap) loaded into memory (as byte arrays). I want to pass an image (as a byte array) to my exported Matlab function so that it can continue to use it internally as if it was read from imread(). How is this done?
im = imread('c:\myimage.jpg')
I want to pass 'im' into my Matlab function from C/C++ (I don't want to have to save the bytes to disk and load them using imread since I already have them all in memory). Is simply passing in the raw bytes in mxArray good enough (including the image header bytes)?