Retain the original image's color type when encoding in raw unmodified format (flutter/engine#5735)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user