code: def _padding(self, image, geometry, options):
          
          # The order is important. The gravity option should come before extent.
          image['options']['background'] = options.get('padding_color')
          image['options']['gravity'] = 'center'
          image['options']['extent'] = '%sx%s' % (geometry[0], geometry[1])
          return image
docs: Pads the image