Fixed Display::genStringImage to have an accurate bound