Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkXmp.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 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 SkXmp_DEFINED
9#define SkXmp_DEFINED
10
13
14class SkData;
15struct SkGainmapInfo;
16
17#include <cstddef>
18#include <memory>
19
20/*
21 * An interface to extract information from XMP metadata.
22 */
24public:
25 SkXmp() = default;
26 virtual ~SkXmp() = default;
27 // Make noncopyable
28 SkXmp(const SkXmp&) = delete;
29 SkXmp& operator= (const SkXmp&) = delete;
30
31 // Create from XMP data.
32 static std::unique_ptr<SkXmp> Make(sk_sp<SkData> xmpData);
33 // Create from standard XMP + extended XMP data, see XMP Specification Part 3: Storage in files,
34 // Section 1.1.3.1: Extended XMP in JPEG
35 static std::unique_ptr<SkXmp> Make(sk_sp<SkData> xmpStandard, sk_sp<SkData> xmpExtended);
36
37 // Extract HDRGM gainmap parameters.
38 virtual bool getGainmapInfoHDRGM(SkGainmapInfo* info) const = 0;
39
40 // Extract HDRGainMap gainmap parameters.
42
43 // If this includes GContainer metadata and the GContainer contains an item with semantic
44 // GainMap and Mime of image/jpeg, then return true, and populate |offset| and |size| with
45 // that item's offset (from the end of the primary JPEG image's EndOfImage), and the size of
46 // the gainmap.
47 virtual bool getContainerGainmapLocation(size_t* offset, size_t* size) const = 0;
48
49 // Return the GUID of an Extended XMP if present, or null otherwise.
50 virtual const char* getExtendedXmpGuid() const = 0;
51};
52
53#endif
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
#define SK_API
Definition SkAPI.h:35
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
Definition SkXmp.h:23
virtual const char * getExtendedXmpGuid() const =0
virtual bool getGainmapInfoHDRGM(SkGainmapInfo *info) const =0
virtual ~SkXmp()=default
virtual bool getGainmapInfoHDRGainMap(SkGainmapInfo *info) const =0
SkXmp()=default
virtual bool getContainerGainmapLocation(size_t *offset, size_t *size) const =0
SkXmp(const SkXmp &)=delete
Point offset