Skia
2D Graphics Library
SkImageEncoder.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Google Inc.
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 SkImageEncoder_DEFINED
9 #define SkImageEncoder_DEFINED
10 
11 // TODO: update clients so we can remove this include, they should IWYU
12 #include "include/core/SkBitmap.h"
13 
14 #include "include/core/SkData.h"
16 #include "include/core/SkPixmap.h"
17 #include "include/core/SkStream.h"
18 
19 class SkBitmap;
20 
41 SK_API bool SkEncodeImage(SkWStream* dst, const SkPixmap& src,
42  SkEncodedImageFormat format, int quality);
43 
48 
66 
71 
72 #endif // SkImageEncoder_DEFINED
SkEncodePixmap
SK_API sk_sp< SkData > SkEncodePixmap(const SkPixmap &src, SkEncodedImageFormat format, int quality)
Encode SkPixmap in the given binary image format.
SkBitmap.h
SkPixmap.h
sk_sp< SkData >
SkEncodeBitmap
SK_API sk_sp< SkData > SkEncodeBitmap(const SkBitmap &src, SkEncodedImageFormat format, int quality)
Helper that extracts the pixmap from the bitmap, and then calls SkEncodePixmap()
SkEncodedImageFormat.h
SK_API
#define SK_API
Definition: SkTypes.h:181
SkData.h
SkEncodedImageFormat
SkEncodedImageFormat
Enum describing format of encoded data.
Definition: SkEncodedImageFormat.h:16
SkPixmap
Definition: SkPixmap.h:31
f
float f
Definition: skcms.cc:52
SkWStream
Definition: SkStream.h:227
SkEncodeImage
SK_API bool SkEncodeImage(SkWStream *dst, const SkPixmap &src, SkEncodedImageFormat format, int quality)
Encode SkPixmap in the given binary image format.
SkStream.h
SkBitmap
Definition: SkBitmap.h:50