使用 tifffile.imwrite 保存 TIFF 图像会在图像上写出奇怪的线条

问题描述 投票:0回答:0

我正在尝试读取数据并使用 tifffile 将其保存到 TIFF。不幸的是,由于数据保密,我不能分享数据。

以下是我用来保存图像的代码,它给出了奇怪的线条,正如您在图像中看到的那样:

img = img_read_func() # Function to get the data
tifffile.imwrite("img.tiff", img)

当我使用 matplotlib 绘制图像时,图像是正确的并且没有奇怪的线条:

img = img_read_func() # Function to get the data
plt.imshow(img)
plt.show(img)

其他可能相关的信息,因为我不能分享数据本身:

  • python 版本 - 3.9.16
  • 图像大小 - (15794, 7329)

我尝试查看 GitHub 上的 tifffile 问题和堆栈溢出问题,但没有找到任何相关内容。

python tiff
© www.soinside.com 2019 - 2024. All rights reserved.