gpt4 book ai didi

c++ - 如何将 TIFF 图像数据传递给 JUCE(不支持 TIFF)?

转载 作者:行者123 更新时间:2023-11-28 03:45:32 29 4
gpt4 key购买 nike

我正在使用 c++ JUCE 库学习 gui 编程。该库支持图像文件格式(png、jpg)。但我想了解如何使用其他文件格式,例如 tiff。

在谷歌之后我得到了 libtiff。

我的问题是显示它的准确方法是什么。我是否需要将 .tiff 文件从 tiff 转换为 jpeg/png 才能执行此操作。

但我认为这需要双重处理。

任何人都可以解释原始/原生/基本图像文件格式,以便我需要将所有图像转换为该类型并直接使用它。

因为我在 winAPI 中发现了一些用于处理图像的东西,他们在其中使用来自文件格式的图像数据。

如果有人能告诉我处理和显示图像数据的方法,那将非常有帮助。

最佳答案

Can anyone explain the raw/native/basic image file format so that I need to convert all images into that type and use it directly.

没有“原生”图像文件格式,但 RGB 很接近(特别是如果您剥离标题以仅提供像素值的宽度×高度× channel 数组)。你可能不想用它来存储所有东西,因为你的缓冲区会非常大。让您的图书馆处理存储。

It will be very helpful if someone can let me know the approach for handling images data and displaying it.

没有“那个”方法。 C++ 本身并没有说明任何有关图像的信息,您可以通过多种方式来处理它们。您的设计将取决于您的功能需求规范和可用的库。

I am using learning gui programming using c++ JUCE library. That library have supports for image file format(png, jpg). But I wants to learn how can I use other file format for example tiff.

After google I got libtiff.

My question is what will be the accurate approach for displaying this. Should I need to convert .tiff file into jpeg/png from tiff for doing this.

But I think this will require double processing.

如果您的意思是使用 libtiff 将 TIFF 格式的图像转换为 JUCE 支持的格式,那么您说这引入了一个额外的初始处理步骤是对的。但是,就您所说的而言,听起来任何可能的性能影响都将被简单明了的好处大大地、疯狂地和巨大地抵消。所以我会这样做。

关于c++ - 如何将 TIFF 图像数据传递给 JUCE(不支持 TIFF)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7820130/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com