/src/libheif/libheif/text.cc
Line | Count | Source |
1 | | /* |
2 | | * HEIF codec. |
3 | | * Copyright (c) 2023 Dirk Farin <dirk.farin@gmail.com> |
4 | | * Copyright (c) 2025 Brad Hards <bradh@frogmouth.net> |
5 | | * |
6 | | * This file is part of libheif. |
7 | | * |
8 | | * libheif is free software: you can redistribute it and/or modify |
9 | | * it under the terms of the GNU Lesser General Public License as |
10 | | * published by the Free Software Foundation, either version 3 of |
11 | | * the License, or (at your option) any later version. |
12 | | * |
13 | | * libheif is distributed in the hope that it will be useful, |
14 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | | * GNU Lesser General Public License for more details. |
17 | | * |
18 | | * You should have received a copy of the GNU Lesser General Public License |
19 | | * along with libheif. If not, see <http://www.gnu.org/licenses/>. |
20 | | */ |
21 | | |
22 | | #include <string> |
23 | | #include "text.h" |
24 | | #include "error.h" |
25 | | #include <iostream> |
26 | | |
27 | | |
28 | | Result<std::vector<uint8_t>> TextItem::encode() const |
29 | 0 | { |
30 | 0 | std::vector<uint8_t> data; |
31 | 0 | data.assign(m_text.begin(), m_text.end()); |
32 | 0 | return data; |
33 | 0 | } |
34 | | |
35 | | Error TextItem::parse(const std::vector<uint8_t> &data) |
36 | 19 | { |
37 | 19 | m_text.assign(data.begin(), data.end()); |
38 | 19 | return Error::Ok; |
39 | 19 | } |