adding ImageAnalyzer class to encapsulate operations on image