Reshaped image array should be of size (RENDER_HEIGHT, RENDER_WIDTH, 4) instead of (RENDER_WIDTH, RENDER_HEIGHT, 4).