Image area and perimeter source code in VC++ image processing