Polygon: guard against corruption in createImage

Was corrupting data, so being more careful with start and
end limits.