Use gm to resize images