chromium/third_party/skia/include/private/SkExif.h

/*
 * Copyright 2023 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkExif_DEFINED
#define SkExif_DEFINED

#include "include/codec/SkEncodedOrigin.h"
#include "include/private/base/SkAPI.h"

#include <cstdint>
#include <optional>

class SkData;

namespace SkExif {

// Tag values that are parsed by Parse and stored in Metadata.
static constexpr uint16_t kOriginTag =;
static constexpr uint16_t kResolutionUnitTag =;
static constexpr uint16_t kXResolutionTag =;
static constexpr uint16_t kYResolutionTag =;
static constexpr uint16_t kPixelXDimensionTag =;
static constexpr uint16_t kPixelYDimensionTag =;

struct Metadata {};

/*
 * Parse the metadata specified in |data| and write them to |metadata|. Stop only at an
 * unrecoverable error (allow truncated input).
 */
void SK_API Parse(Metadata& metadata, const SkData* data);

}  // namespace SkExif

#endif