HI Jaga,
Please try this
WebElement Image = driver.findElementById("com.davemorrissey.labs.subscaleview.sample:id/imageView");
Thread.sleep(5000);
int x=Image.getLocation().getX()+Image.getSize().getWidth()/2;
int y= Image.getLocation().getY()+Image.getSize().getHeight()/2;
//Zoom out
TouchAction finger1= new TouchAction(driver);
finger1.press(Image, x, y-20).moveTo(Image,x,y-50);
TouchAction finger2= new TouchAction(driver);
finger2.press(Image, x, y+20).moveTo(Image, x, y+50);
MultiTouchAction action= new MultiTouchAction(driver);
action.add(finger1).add(finger2).perform();
System.out.println("Zoom Done");
Thread.sleep(10000);
TouchAction finger3= new TouchAction(driver);
finger3.press(Image, x, y-20).moveTo(Image, x, y-10);
TouchAction finger4= new TouchAction(driver);
finger4.press(Image, x, y+20).moveTo(Image, x, y+10);
MultiTouchAction action2= new MultiTouchAction(driver);
action2.add(finger3).add(finger4).perform();
System.out.println("Pinch Done");
Thread.sleep(10000);