Added part of the implementation for resizing the initial image