Thank you for your help! I solved this problem.
The correct python script:
------------------------------------------------------------------------------------------
import cv2
import numpy as np
img = cv2.imread('daisy.bmp')
img = cv2.resize(img, (128, 128))
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
with open('daisy.h', 'w') as fout:
print('#define STATIC_IMAGE_NAME "daisy"', file=fout)
print('const char daisy_bmp[] = {', file=fout)
img.tofile(fout, ', ', '0x%02X')
print('};\n', file=fout)
------------------------------------------------------------------------------------------
The ; in the last is important.