Index: src/images/SkImageDecoder.cpp |
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp |
index 1544edf366bca7939bebae7faa1faaef536dec06..52a445c78277f78e360e3c2889f5a13da5da13b3 100644 |
--- a/src/images/SkImageDecoder.cpp |
+++ b/src/images/SkImageDecoder.cpp |
@@ -242,8 +242,8 @@ bool SkImageDecoder::cropBitmap(SkBitmap *dst, SkBitmap *src, int sampleSize, |
} |
// if the destination has no pixels then we must allocate them. |
if (dst->isNull()) { |
- dst->setConfig(src->getConfig(), w, h); |
- dst->setIsOpaque(src->isOpaque()); |
+ dst->setConfig(src->getConfig(), w, h, 0, src->isOpaque() ? |
+ kOpaque_SkAlphaType : kPremul_SkAlphaType); |
if (!this->allocPixelRef(dst, NULL)) { |
SkDEBUGF(("failed to allocate pixels needed to crop the bitmap")); |