imwrite(data, ['filename_' num2str(p) '.bmp'] )