Coverage Report

Created: 2026-02-14 07:09

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libheif/libheif/image-items/iden.h
Line
Count
Source
1
/*
2
 * HEIF codec.
3
 * Copyright (c) 2024 Dirk Farin <dirk.farin@gmail.com>
4
 *
5
 * This file is part of libheif.
6
 *
7
 * libheif is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Lesser General Public License as
9
 * published by the Free Software Foundation, either version 3 of
10
 * the License, or (at your option) any later version.
11
 *
12
 * libheif is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public License
18
 * along with libheif.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#ifndef LIBHEIF_IDEN_H
22
#define LIBHEIF_IDEN_H
23
24
#include "image_item.h"
25
#include <vector>
26
#include <string>
27
#include <memory>
28
#include <set>
29
30
31
class ImageItem_iden : public ImageItem
32
{
33
public:
34
  ImageItem_iden(HeifContext* ctx, heif_item_id id);
35
36
  ImageItem_iden(HeifContext* ctx);
37
38
16
  uint32_t get_infe_type() const override { return fourcc("iden"); }
39
40
  // TODO: nclx depends on contained format
41
  // const heif_color_profile_nclx* get_forced_output_nclx() const override { return nullptr; }
42
43
  // heif_compression_format get_compression_format() const override { return heif_compression_HEVC; }
44
45
  //Error on_load_file() override;
46
47
  Error get_coded_image_colorspace(heif_colorspace* out_colorspace, heif_chroma* out_chroma) const override;
48
49
  int get_luma_bits_per_pixel() const override;
50
51
  int get_chroma_bits_per_pixel() const override;
52
53
  Result<Encoder::CodedImageData> encode(const std::shared_ptr<HeifPixelImage>& image,
54
                                         heif_encoder* encoder,
55
                                         const heif_encoding_options& options,
56
                                         heif_image_input_class input_class) override
57
0
  {
58
0
    return Error{heif_error_Unsupported_feature,
59
0
                 heif_suberror_Unspecified, "Cannot encode image to 'iden'"};
60
0
  }
61
62
  Result<std::shared_ptr<HeifPixelImage>> decode_compressed_image(const heif_decoding_options& options,
63
                                                                  bool decode_tile_only, uint32_t tile_x0, uint32_t tile_y0,
64
                                                                  std::set<heif_item_id> processed_ids) const override;
65
66
  heif_brand2 get_compatible_brand() const override;
67
68
private:
69
};
70
71
72
#endif //LIBHEIF_IDEN_H