create thumbnail of a specific size with center gravity