I need to convert an image to pixels and remove the outer edge of the image. i need only inner edge of an gray scaled image....

Thank you for ur help...............