Matlab code to convert images to SRAM hex format