--- dlls/windowscodecs/converter.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index 6e4f5c5f9b2..bf2ed9d74f0 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -859,6 +859,7 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe } return S_OK; default: + FIXME("Unimplemented conversion path!\n"); return WINCODEC_ERR_UNSUPPORTEDOPERATION; } }
--- dlls/windowscodecs/converter.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index bf2ed9d74f0..bc10a9eccc4 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -722,6 +722,15 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe pbBuffer[cbStride*y+4*x+3] = 0xff; } return S_OK; + case format_32bppRGBA: + if (prc) + { + HRESULT res; + res = IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer); + if (FAILED(res)) return res; + reverse_bgr8(4, pbBuffer, prc->Width, prc->Height, cbStride); + } + return S_OK; case format_32bppBGRA: if (prc) return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer);
Signed-off-by: Jan Sikorski jsikorski@codeweavers.com
On 22 Oct 2020, at 15:07, Jan Sikorski jsikorski@codeweavers.com wrote:
dlls/windowscodecs/converter.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index bf2ed9d74f0..bc10a9eccc4 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -722,6 +722,15 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe pbBuffer[cbStride*y+4*x+3] = 0xff; } return S_OK;
- case format_32bppRGBA:
if (prc)
{
HRESULT res;
res = IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer);
if (FAILED(res)) return res;
reverse_bgr8(4, pbBuffer, prc->Width, prc->Height, cbStride);
}
case format_32bppBGRA: if (prc) return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer);return S_OK;
-- 2.27.0
Signed-off-by: Esme Povirk esme@codeweavers.com
--- dlls/windowscodecs/tests/converter.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index 87f68207c6c..0429b7a3af6 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -1890,6 +1890,9 @@ START_TEST(converter) test_conversion(&testdata_32bppBGRA, &testdata_24bppRGB, "32bppBGRA -> 24bppRGB", FALSE); test_conversion(&testdata_32bppRGBA, &testdata_24bppBGR, "32bppRGBA -> 24bppBGR", FALSE);
+ test_conversion(&testdata_32bppRGBA, &testdata_32bppBGRA, "32bppRGBA -> 32bppBGRA", FALSE); + test_conversion(&testdata_32bppBGRA, &testdata_32bppRGBA, "32bppBGRA -> 32bppRGBA", FALSE); + test_conversion(&testdata_64bppRGBA, &testdata_32bppRGBA, "64bppRGBA -> 32bppRGBA", FALSE); test_conversion(&testdata_64bppRGBA, &testdata_32bppRGB, "64bppRGBA -> 32bppRGB", FALSE);
Signed-off-by: Jan Sikorski jsikorski@codeweavers.com
On 22 Oct 2020, at 15:07, Jan Sikorski jsikorski@codeweavers.com wrote:
dlls/windowscodecs/tests/converter.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index 87f68207c6c..0429b7a3af6 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -1890,6 +1890,9 @@ START_TEST(converter) test_conversion(&testdata_32bppBGRA, &testdata_24bppRGB, "32bppBGRA -> 24bppRGB", FALSE); test_conversion(&testdata_32bppRGBA, &testdata_24bppBGR, "32bppRGBA -> 24bppBGR", FALSE);
- test_conversion(&testdata_32bppRGBA, &testdata_32bppBGRA, "32bppRGBA -> 32bppBGRA", FALSE);
- test_conversion(&testdata_32bppBGRA, &testdata_32bppRGBA, "32bppBGRA -> 32bppRGBA", FALSE);
- test_conversion(&testdata_64bppRGBA, &testdata_32bppRGBA, "64bppRGBA -> 32bppRGBA", FALSE); test_conversion(&testdata_64bppRGBA, &testdata_32bppRGB, "64bppRGBA -> 32bppRGB", FALSE);
-- 2.27.0
Signed-off-by: Esme Povirk esme@codeweavers.com
Signed-off-by: Jan Sikorski jsikorski@codeweavers.com
On 22 Oct 2020, at 15:07, Jan Sikorski jsikorski@codeweavers.com wrote:
dlls/windowscodecs/converter.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index 6e4f5c5f9b2..bf2ed9d74f0 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -859,6 +859,7 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe } return S_OK; default:
}FIXME("Unimplemented conversion path!\n"); return WINCODEC_ERR_UNSUPPORTEDOPERATION;
}
2.27.0