Modify subImage range

Make the size of subImage adjustable