Flutter Engine
The Flutter Engine
EncodeUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef EncodeUtils_DEFINED
9#define EncodeUtils_DEFINED
10
11class SkBitmap;
12class SkPixmap;
13class SkString;
14
15namespace ToolUtils {
16
17// Encodes the bitmap into a data:/image/png;base64,... url suitable to view in a browser after
18// printing to a log. If false is returned, dst holds an error message instead of a URI.
20
21bool EncodeImageToPngFile(const char* path, const SkBitmap& src);
22bool EncodeImageToPngFile(const char* path, const SkPixmap& src);
23
24} // namespace ToolUtils
25
26#endif
bool EncodeImageToPngFile(const char *path, const SkBitmap &src)
Definition: EncodeUtils.cpp:60
bool BitmapToBase64DataURI(const SkBitmap &bitmap, SkString *dst)
Definition: EncodeUtils.cpp:25
Definition: bitmap.py:1
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
Definition: switches.h:57
dst
Definition: cp.py:12