def mark_as_cover(container, name):
 if (name not in container.mime_map):
  raise ValueError((u'Cannot mark %s as cover as it does not exist' % name))
 mt = container.mime_map[name]
 if (not is_raster_image(mt)):
  raise ValueError((u'Cannot mark %s as the cover image as it is not a raster image' % name))
 if (container.book_type == u'azw3'):
  mark_as_cover_azw3(container, name)
 else:
  mark_as_cover_epub(container, name)

def mark_as_cover ( container , name ) : if ( name not in container . mime_map ) : raise ValueError ( ( u'Cannot mark %s as cover as it does not exist' % name ) ) mt = container . mime_map [ name ] if ( not is_raster_image ( mt ) ) : raise ValueError ( ( u'Cannot mark %s as the cover image as it is not a raster image' % name ) ) if ( container . book_type == u'azw3' ) : mark_as_cover_azw3 ( container , name ) else : mark_as_cover_epub ( container , name )
mark the specified image as the cover image .