Loading...
Searching...
No Matches
helper_functions.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef HELPER_FUNCTIONS_HPP
#define HELPER_FUNCTIONS_HPP
#include <string>
#include "basicio.hpp"
#include "types.hpp"
std::string string_from_unterminated(const char* data, size_t data_length);
namespace Exiv2 {
static constexpr size_t BYTE = 0x1;
static constexpr size_t WCHAR = 0x2;
static constexpr size_t WORD = 0X2;
static constexpr size_t DWORD = 0x4;
static constexpr size_t QWORD = 0x8;
static constexpr size_t GUID = 0x10;
[[nodiscard]] uint64_t readQWORDTag(const Exiv2::BasicIo::UniquePtr& io);
[[nodiscard]] uint32_t readDWORDTag(const Exiv2::BasicIo::UniquePtr& io);
[[nodiscard]] uint16_t readWORDTag(const Exiv2::BasicIo::UniquePtr& io);
[[nodiscard]] std::string readStringWcharTag(const Exiv2::BasicIo::UniquePtr& io, size_t length);
[[nodiscard]] std::string readStringTag(const Exiv2::BasicIo::UniquePtr& io, size_t length = DWORD);
[[nodiscard]] std::string getAspectRatio(uint64_t width, uint64_t height);
} // namespace Exiv2
#endif // HELPER_FUNCTIONS_HPP
Exiv2::BasicIo::UniquePtr
std::unique_ptr< BasicIo > UniquePtr
BasicIo auto_ptr type.
Definition basicio.hpp:38
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::getAspectRatio
std::string getAspectRatio(uint64_t width, uint64_t height)
Calculates Aspect Ratio of a video.
Definition helper_functions.cpp:56