Retain the original image's color type when encoding in raw unmodified format (flutter/engine#5735)

This commit is contained in:
Jason Simmons 2018-07-12 17:12:21 -07:00 committed by GitHub
parent 4170f2dc2b
commit d8bd42fbb3

View File

@ -176,7 +176,7 @@ sk_sp<SkData> EncodeImage(sk_sp<SkImage> p_image,
return CopyImageByteData(raster_image, kRGBA_8888_SkColorType);
} break;
case kRawUnmodified: {
return CopyImageByteData(raster_image, kN32_SkColorType);
return CopyImageByteData(raster_image, raster_image->colorType());
} break;
}