generate_image does not take $w $h