On pc, the filenames get mangled with the addition of C:\fakepath\ to the file path. This patch removes the path portion from the filename. It also replaces the file extension with .jpg, since that's the format the image is saved in.
This should handle both forward and backslashes as well as filenames having no slashes and no file extensions. Only anything after the last dot in the filename is removed, if the filename has multiple dots only the last part is replaced
On pc, the filenames get mangled with the addition of C:\fakepath\ to the file path. This patch removes the path portion from the filename. It also replaces the file extension with .jpg, since that's the format the image is saved in.
This should handle both forward and backslashes as well as filenames having no slashes and no file extensions. Only anything after the last dot in the filename is removed, if the filename has multiple dots only the last part is replaced