Index: src/ports/SkImageDecoder_WIC.cpp |
diff --git a/src/ports/SkImageDecoder_WIC.cpp b/src/ports/SkImageDecoder_WIC.cpp |
index c7222e635a993f97f5e07ee0bc140f64b1864f5b..5febd856d6cc87c209957f134f3b36af9814ea85 100644 |
--- a/src/ports/SkImageDecoder_WIC.cpp |
+++ b/src/ports/SkImageDecoder_WIC.cpp |
@@ -411,6 +411,10 @@ bool SkImageEncoder_WIC::onEncode(SkWStream* stream |
if (SUCCEEDED(hr)) { |
hr = piBitmapFrameEncode->SetPixelFormat(&formatGUID); |
} |
+ if (SUCCEEDED(hr)) { |
msarett
2016/03/21 20:09:28
Adding back in code that I deleted in https://code
|
+ //Be sure the image format is the one requested. |
+ hr = IsEqualGUID(formatGUID, formatDesired) ? S_OK : E_FAIL; |
+ } |
//Write the pixels into the frame. |
if (SUCCEEDED(hr)) { |
@@ -440,7 +444,6 @@ static SkImageEncoder* sk_imageencoder_wic_factory(SkImageEncoder::Type t) { |
switch (t) { |
case SkImageEncoder::kBMP_Type: |
case SkImageEncoder::kICO_Type: |
- case SkImageEncoder::kJPEG_Type: |
case SkImageEncoder::kPNG_Type: |
break; |
default: |