Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, doc, page_nb):
"""
Don't create directly. Please use ImgDoc.get_page()
"""
self.fs = doc.fs
self.doc = doc
self.page_nb = page_nb
assert(self.page_nb >= 0)
self.__prototype_exporters = {
'PNG': PageExporter(self, 'PNG', 'image/png', ["png"]),
'JPEG': PageExporter(self, 'JPEG', 'image/jpeg', ["jpeg", "jpg"]),
}
def __init__(self, doc, page_nb):
"""
Don't create directly. Please use ImgDoc.get_page()
"""
self.fs = doc.fs
self.doc = doc
self.page_nb = page_nb
assert(self.page_nb >= 0)
self.__prototype_exporters = {
'PNG': PageExporter(self, 'PNG', 'image/png', ["png"]),
'JPEG': PageExporter(self, 'JPEG', 'image/jpeg', ["jpeg", "jpg"]),
}
def __copy__(self):
return PageExporter(self.page, self.img_format, self.mime,
self.valid_exts)