27 if (!
bitmap.peekPixels(&pm)) {
28 dst->set(
"peekPixels failed");
39 dst->set(
"SkPngEncoder::Encode failed");
48 static const size_t kMaxBase64Length = 1024 * 1024;
49 if (
len > kMaxBase64Length) {
50 dst->printf(
"Encoded image too large (%u bytes)",
static_cast<uint32_t
>(
len));
56 dst->prepend(
"data:image/png;base64,");
const void * data() const
sk_sp< SkData > detachAsData()
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
static size_t EncodedSize(size_t srcDataLength)
static size_t Encode(const void *src, size_t length, void *dst, const char *encode=nullptr)