PyImageSearch / imutils

A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

class TempFile in imutils/io not enough access to temporary file name without path

michaelkokorev opened this issue · comments

In class TempFile from imutils/io not enough access to temporary file name without path, I offer such an option:
`

def __init__(self, basePath="./", ext=".jpg"):
	# construct the file name
	self.filename = "{rand}{ext}".format(rand=str(uuid.uuid4()), ext=ext)

	# construct the file path
	self.path = "{base_path}/{filename}".format(base_path=basePath, filename = self.filename)`