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.
MIT License
4.54k stars 1.03k forks source link

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

Open michaelkokorev opened 4 years ago

michaelkokorev commented 4 years ago

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)`