tiff Windows成像组件C++
我试图将libtiff替换为WIC(因为Libtiff无法通过黑鸭分析工具),
我能够创建一个TIFF。 我还需要更改压缩类型 因此,我将代码更改为
if (SUCCEEDED(hr))
{
// This is how you customize the TIFF output.
PROPBAG2 option = { 0 };
option.pstrName = L"TiffCompressionMethod";
VARIANT varValue;
VariantInit(&varValue);
varValue.vt = VT_UI1;
varValue.bVal = WICTiffCompressionRLE;
hr = pPropertybag->Write(1, &option, &varValue);
if (SUCCEEDED(hr))
{
hr = piBitmapFrame->Initialize(pPropertybag);
}
}
我找到了此 https://learn.microsoft.com/en-us/windows/windows/win32/wic/wic-photoprop-system-image-image-resolutionunit 但是我不明白如何使用WIC元数据API来改变这一点。
你能帮忙吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WIC内置的TIFF编码器始终将
tifftag_resolutionunit
为2(英寸)。您可以使用WIC读取现有标签,但是不能为此特定的元数据编写其他值。The WIC built-in TIFF encoder always writes the
TIFFTAG_RESOLUTIONUNIT
as 2 (inches). You can use WIC to read the existing tag, but you can't write a different value for this particular metadata item.