#NEWLINE# def _get_thumbnail_src_from_file( dir_path , image_file , force_no_processing = False ) : #NEWLINE# #INDENT# "\n    Get base-64 encoded data as a string for the given image file's thumbnail,\n    for use directly in HTML <img> tags, or a path to the original if image\n    scaling is not supported.\n\n    @param {String} dir_path - The directory containing the image file\n\n    @param {String} image_file - The filename of the image file within dir_path\n\n    @param {Boolean=False} force_no_processing - If True, do not attempt to\n        actually process a thumbnail, PIL image or anything. Simply return the\n        image filename as src.\n\n    @return {String} The base-64 encoded image data string, or path to the file\n        itself if not supported.\n    " #NEWLINE# if force_no_processing : #NEWLINE# #INDENT# if ( image_file . endswith ( 'tif' ) or image_file . endswith ( 'tiff' ) ) : #NEWLINE# #INDENT# return UNSUPPORTED_IMAGE_TYPE_DATA #NEWLINE# #UNINDENT# return image_file #NEWLINE# #UNINDENT# img = _get_thumbnail_image_from_file ( dir_path , image_file ) #NEWLINE# return _get_src_from_image ( img , image_file )