Flutter Engine
The Flutter Engine
third_party
skia
include
private
SkExif.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 SkExif_DEFINED
9
#define SkExif_DEFINED
10
11
#include "
include/codec/SkEncodedOrigin.h
"
12
#include "
include/private/base/SkAPI.h
"
13
14
#include <cstdint>
15
#include <optional>
16
17
class
SkData
;
18
19
namespace
SkExif
{
20
21
// Tag values that are parsed by Parse and stored in Metadata.
22
static
constexpr
uint16_t
kOriginTag
= 0x112;
23
static
constexpr
uint16_t
kResolutionUnitTag
= 0x0128;
24
static
constexpr
uint16_t
kXResolutionTag
= 0x011a;
25
static
constexpr
uint16_t
kYResolutionTag
= 0x011b;
26
static
constexpr
uint16_t
kPixelXDimensionTag
= 0xa002;
27
static
constexpr
uint16_t
kPixelYDimensionTag
= 0xa003;
28
29
struct
Metadata
{
30
// The image orientation.
31
std::optional<SkEncodedOrigin>
fOrigin
;
32
33
// The HDR headroom property.
34
// https://developer.apple.com/documentation/appkit/images_and_pdf/applying_apple_hdr_effect_to_your_photos
35
std::optional<float>
fHdrHeadroom
;
36
37
// Resolution.
38
std::optional<uint16_t>
fResolutionUnit
;
39
std::optional<float>
fXResolution
;
40
std::optional<float>
fYResolution
;
41
42
// Size in pixels.
43
std::optional<uint32_t>
fPixelXDimension
;
44
std::optional<uint32_t>
fPixelYDimension
;
45
};
46
47
/*
48
* Parse the metadata specified in |data| and write them to |metadata|. Stop only at an
49
* unrecoverable error (allow truncated input).
50
*/
51
void
SK_API
Parse
(
Metadata
& metadata,
const
SkData
*
data
);
52
53
}
// namespace SkExif
54
55
#endif
SkAPI.h
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkEncodedOrigin.h
SkData
Definition:
SkData.h:25
SkExif
Definition:
SkExif.h:19
SkExif::kResolutionUnitTag
static constexpr uint16_t kResolutionUnitTag
Definition:
SkExif.h:23
SkExif::kPixelXDimensionTag
static constexpr uint16_t kPixelXDimensionTag
Definition:
SkExif.h:26
SkExif::kPixelYDimensionTag
static constexpr uint16_t kPixelYDimensionTag
Definition:
SkExif.h:27
SkExif::kOriginTag
static constexpr uint16_t kOriginTag
Definition:
SkExif.h:22
SkExif::kXResolutionTag
static constexpr uint16_t kXResolutionTag
Definition:
SkExif.h:24
SkExif::Parse
void SK_API Parse(Metadata &metadata, const SkData *data)
Definition:
SkExif.cpp:182
SkExif::kYResolutionTag
static constexpr uint16_t kYResolutionTag
Definition:
SkExif.h:25
SkExif::Metadata
Definition:
SkExif.h:29
SkExif::Metadata::fPixelYDimension
std::optional< uint32_t > fPixelYDimension
Definition:
SkExif.h:44
SkExif::Metadata::fPixelXDimension
std::optional< uint32_t > fPixelXDimension
Definition:
SkExif.h:43
SkExif::Metadata::fHdrHeadroom
std::optional< float > fHdrHeadroom
Definition:
SkExif.h:35
SkExif::Metadata::fOrigin
std::optional< SkEncodedOrigin > fOrigin
Definition:
SkExif.h:31
SkExif::Metadata::fYResolution
std::optional< float > fYResolution
Definition:
SkExif.h:40
SkExif::Metadata::fResolutionUnit
std::optional< uint16_t > fResolutionUnit
Definition:
SkExif.h:38
SkExif::Metadata::fXResolution
std::optional< float > fXResolution
Definition:
SkExif.h:39
data
std::shared_ptr< const fml::Mapping > data
Definition:
texture_gles.cc:63
Generated on Sun Jun 23 2024 21:56:03 for Flutter Engine by
1.9.4