There are minor changes in magento 2 to resize image, please use below code for resize the image in magento 2
For DirectoryList we can use this class