Wordpress Galleries - Different sizes for galleries depending on number of columns

Is there a way to say:
- when I have 3 images in a gallery I want the image to be one size
- when I have 2 images in a gallery I want the image to be another size
- etc.

Is there a way to tell wordpress you want images to be a certain size depending on how many columns you decide to use for the images?

Note: I'm using the jetpack plugin.