Drupal Image and GalleryFormatter I am using the Image and the Galleryformatter module. I am getting these two errors on configure media page:

Warning: Division by zero in theme_image_style_preview() (line XXX of /.../modules/image/image.admin.inc).

Warning: array_intersect_key(): Argument #1 is not an array in theme_image_style_preview() (line XXX of /.../modules/image/image.admin.inc).
I found @Sohail to be almost right. I did:

chmod 777 drupal/sites/example.com/files/styles

and the error went away and my drupal 7 new image-style worked. I did not have a styles or even a files folder in druapal/sites/all/files