Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tools
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
11
class
SkBitmap
;
12
class
SkPixmap
;
13
class
SkString
;
14
15
namespace
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.
19
bool
BitmapToBase64DataURI
(
const
SkBitmap
&
bitmap
,
SkString
* dst);
20
21
bool
EncodeImageToPngFile
(
const
char
* path,
const
SkBitmap
& src);
22
bool
EncodeImageToPngFile
(
const
char
* path,
const
SkPixmap
& src);
23
24
}
// namespace ToolUtils
25
26
#endif
SkBitmap
Definition
SkBitmap.h:59
SkPixmap
Definition
SkPixmap.h:40
SkString
Definition
SkString.h:118
ToolUtils
Definition
DecodeUtils.cpp:20
ToolUtils::EncodeImageToPngFile
bool EncodeImageToPngFile(const char *path, const SkBitmap &src)
Definition
EncodeUtils.cpp:60
ToolUtils::BitmapToBase64DataURI
bool BitmapToBase64DataURI(const SkBitmap &bitmap, SkString *dst)
Definition
EncodeUtils.cpp:25
bitmap
Definition
bitmap.py:1
Generated on Fri Apr 26 2024 06:18:09 for Flutter Engine by
1.9.8