def _get_thumbnail_path(image_path, width, height):
 if (image_path is None):
  return None
 (_, ext) = os.path.splitext(image_path)
 if (ext in ['.png', '.jpg', '.jpeg', '.gif']):
  thumbnail_path = image_path
 else:
  fingerprint = cache.hash_digest('{width}x{height}\n{image_path}'.format(**locals()))
  thumbnail_path = os.path.join(temp_path, (fingerprint + _IMAGE_EXTENSION))
  _validate_thumbnail_currentness(image_path, thumbnail_path)
 return thumbnail_path

def _get_thumbnail_path ( image_path , width , height ) : if ( image_path is None ) : return None ( _ , ext ) = os . path . splitext ( image_path ) if ( ext in [ '.png' , '.jpg' , '.jpeg' , '.gif' ] ) : thumbnail_path = image_path else : fingerprint = cache . hash_digest ( '{width}x{height}\n{image_path}' . format ( ** locals ( ) ) ) thumbnail_path = os . path . join ( temp_path , ( fingerprint + _IMAGE_EXTENSION ) ) _validate_thumbnail_currentness ( image_path , thumbnail_path ) return thumbnail_path
get the path to the the thumbnail .