diff --git a/lib/ui/painting.dart b/lib/ui/painting.dart index 33dcb8962575f..ca227397f1b51 100644 --- a/lib/ui/painting.dart +++ b/lib/ui/painting.dart @@ -1574,6 +1574,10 @@ class Paint { /// The format in which image bytes should be returned when using /// [Image.toByteData]. +// We do not expect to add more encoding formats to the ImageByteFormat enum, +// considering the binary size of the engine after LTO optimization. You can +// use the third-party pure dart image library to encode other formats. +// See: https://github.com/flutter/flutter/issues/16635 for more details. enum ImageByteFormat { /// Raw RGBA format. /// @@ -1715,6 +1719,10 @@ class Image { /// /// Returns a future that completes with the binary image data or an error /// if encoding fails. + // We do not expect to add more encoding formats to the ImageByteFormat enum, + // considering the binary size of the engine after LTO optimization. You can + // use the third-party pure dart image library to encode other formats. + // See: https://github.com/flutter/flutter/issues/16635 for more details. Future toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) { assert(!_disposed && !_image._disposed); return _image.toByteData(format: format);