A = imread(filename, fmt) use this command to get a vector A ...
The return value A is an array containing the image data. If the file contains a grayscale image, A is an M-by-N array. If the file contains a truecolor image, A is an M-by-N-by-3 array. For TIFF files containing color images that use the CMYK color space, A is an M-by-N-by-4 array Then Manipulate the A matrix to generate a .COE file
here is an example
with a Matlab code
h**p://www.lbebooks.com/downloads/exportal/VHDL_NEXYS_Example24.pdf