Generate path when size changes instead of on first drawing.
Don't keep original image in memory.