windowscodecs: Add initializations for tiff encoder options.
This commit is contained in:
parent
6d6603b495
commit
b5dfd48bc8
@ -499,7 +499,7 @@ static void test_encoder_properties(const CLSID* clsid_encoder, IPropertyBag2 *o
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (clsid_encoder == &CLSID_WICTiffEncoder)
|
if (clsid_encoder == &CLSID_WICTiffEncoder)
|
||||||
todo_wine test_specific_encoder_properties(options, testdata_tiff_props, all_props, cProperties2);
|
test_specific_encoder_properties(options, testdata_tiff_props, all_props, cProperties2);
|
||||||
|
|
||||||
for (i=0; i < cProperties2; i++)
|
for (i=0; i < cProperties2; i++)
|
||||||
{
|
{
|
||||||
|
@ -54,6 +54,9 @@ static CRITICAL_SECTION_DEBUG init_tiff_cs_debug =
|
|||||||
};
|
};
|
||||||
static CRITICAL_SECTION init_tiff_cs = { &init_tiff_cs_debug, -1, 0, 0, 0, 0 };
|
static CRITICAL_SECTION init_tiff_cs = { &init_tiff_cs_debug, -1, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
static const WCHAR wszTiffCompressionMethod[] = {'T','i','f','f','C','o','m','p','r','e','s','s','i','o','n','M','e','t','h','o','d',0};
|
||||||
|
static const WCHAR wszCompressionQuality[] = {'C','o','m','p','r','e','s','s','i','o','n','Q','u','a','l','i','t','y',0};
|
||||||
|
|
||||||
static void *libtiff_handle;
|
static void *libtiff_handle;
|
||||||
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
|
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
|
||||||
MAKE_FUNCPTR(TIFFClientOpen);
|
MAKE_FUNCPTR(TIFFClientOpen);
|
||||||
@ -1909,7 +1912,31 @@ static HRESULT WINAPI TiffEncoder_CreateNewFrame(IWICBitmapEncoder *iface,
|
|||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions);
|
PROPBAG2 opts[2]= {{0}};
|
||||||
|
opts[0].pstrName = (LPOLESTR)wszTiffCompressionMethod;
|
||||||
|
opts[0].vt = VT_UI1;
|
||||||
|
opts[0].dwType = PROPBAG2_TYPE_DATA;
|
||||||
|
|
||||||
|
opts[1].pstrName = (LPOLESTR)wszCompressionQuality;
|
||||||
|
opts[1].vt = VT_R4;
|
||||||
|
opts[1].dwType = PROPBAG2_TYPE_DATA;
|
||||||
|
|
||||||
|
hr = CreatePropertyBag2(opts, 2, ppIEncoderOptions);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
VARIANT v;
|
||||||
|
VariantInit(&v);
|
||||||
|
V_VT(&v) = VT_UI1;
|
||||||
|
V_UNION(&v, bVal) = WICTiffCompressionDontCare;
|
||||||
|
hr = IPropertyBag2_Write(*ppIEncoderOptions, 1, opts, &v);
|
||||||
|
VariantClear(&v);
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
IPropertyBag2_Release(*ppIEncoderOptions);
|
||||||
|
*ppIEncoderOptions = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user