加载灰度图像时出现像素化

发布于 2024-09-28 10:27:34 字数 299 浏览 1 评论 0原文

我有一个灰度 tiff 图像,当我使用 Image.FromFile 加载它时,该图像的质量非常像素化。但是,如果我事先将 tiff 保存为 Gimp 中的索引,则使用 Image.FromFile 加载该图像将不再像素化。

无论如何,我可以以原始质量加载灰度图像吗?

[编辑] 请注意,当我将图像转换为索引时,调色板仍然只有 256 个条目。在另一个应用程序(例如 xnview)中查看灰度图像和索引图像会以原始质量显示图像的两个版本。我的转换不会导致数据丢失。将其加载到我的 C# 应用程序中时会发生像素化。

感谢您的帮助, 担。

I've got a tiff image that is greyscale, and when I load it using Image.FromFile, the quality of that image is very pixelated. However, if I save the tiff as indexed in Gimp beforehand, then loading that image with Image.FromFile is no longer pixelated.

Is there anyway I can load a greyscale image at the original quality?

[edit] Note that when I convert the image to indexed, the palette is still only 256 entries. Viewing both the greyscale and indexed image in another app (eg. xnview) shows both versions of the image in the original quality. My conversion isn't causing data loss. The pixelation is happening when loading it into my C# app.

Thanks for any help,
Dan.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文