def process(self, file_path, x_index, y_index, z_index, t_index=0):
"""
Method to load the configuration file and select the correct validator and backend
Args:
file_path(str): An absolute file path for the specified tile
x_index(int): The tile index in the X dimension
y_index(int): The tile index in the Y dimension
z_index(int): The tile index in the Z dimension
t_index(int): The time index
Returns:
(io.BufferedReader): A file handle for the specified tile
"""
# Save img to png and return handle
tile_data = Image.open(file_path)
output = six.BytesIO()
tile_data.save(output, format=self.parameters["filetype"].upper())
# Send handle back
return output
评论列表
文章目录