Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tiff_base_writer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 L. E. Segovia <amy@amyspark.me>
3 * SPDX-FileCopyrightText: 2024 Lucas Chollet <lucas.chollet@serenityos.org>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KIS_TIFF_BASE_WRITER_H
9#define KIS_TIFF_BASE_WRITER_H
10
11#include "tiffio.h"
12
13#include <array>
14
15#include <kis_types.h>
16
17class KisTIFFOptions;
18class KoColorSpace;
19
21{
22protected:
24 ~KisTIFFBaseWriter() = default;
25
26 static bool isBitDepthFloat(const KoID depth);
27 static bool writeColorSpaceInformation(TIFF *image,
28 const KoColorSpace *cs,
29 uint16_t &color_type,
30 uint16_t &sample_format,
31 const KoColorSpace *&destColorSpace);
32
33 inline TIFF *image()
34 {
35 return m_image;
36 }
37
39 tdata_t buff,
40 uint32_t depth,
41 uint16_t sample_format,
42 uint8_t nbcolorssamples,
43 const std::array<quint8, 5> &poses);
44
45 TIFF *m_image;
47};
48
49#endif
static bool isBitDepthFloat(const KoID depth)
~KisTIFFBaseWriter()=default
bool copyDataToStrips(KisHLineConstIteratorSP it, tdata_t buff, uint32_t depth, uint16_t sample_format, uint8_t nbcolorssamples, const std::array< quint8, 5 > &poses)
KisTIFFOptions * m_options
static bool writeColorSpaceInformation(TIFF *image, const KoColorSpace *cs, uint16_t &color_type, uint16_t &sample_format, const KoColorSpace *&destColorSpace)
KisTIFFBaseWriter(TIFF *image, KisTIFFOptions *options)
Definition KoID.h:30