Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if not self.init:
self.doOnSetDim()
test = N.zeros((self.ny, self.nx), self.dtype)
self.dataOffset, self._secByteSize = self.fp.save(test, resolution=self.res, metadata=self.metadata, returnoffset=True, extratags=self.extratags)
self.handle.seek(self.handle.tell() - self._secByteSize)
self.init = True
if i is not None:
self.seekSec(i)
if self.style == 'RGB':
photometric = 'RGB'
else:
photometric = None
if int(tifffile.__version__.split('.')[1]) <= 14:
offset, sec = self.fp.save(arr, resolution=self.res, metadata=self.metadata, returnoffset=True, photometric=photometric)
else:
offset, sec = self.fp.save(arr, resolution=self.res, metadata=self.metadata, returnoffset=True, software=self.software, photometric=photometric)