Often in ad network its required to resize images for different ad units. Adnetworks are usually integrated with external feed providers. Each feed provider has different image setups and is required to resize an image according to biz needs
This is sample class which download image from url,resize to required dimenstion and store it locally