Blender V5.3
image_maketx.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 OpenImageIO project
2 * 2026 Blender Authors
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * This is a modified version of maketexture.cpp from OpenImageIO, to add a few
7 * features missing in the native implementation. */
8
9#pragma once
10
11#include <cstdlib>
12#include <string>
13
14#include "util/image_metadata.h"
15#include "util/param.h"
16#include "util/string.h"
17#include "util/types_image.h"
18
20
21#define TX_FILE_FORMAT_VERSION 0
22
23bool resolve_tx(const string &filepath,
24 const string &texture_cache_path,
25 ustring colorspace,
26 const ImageAlphaType alpha_type,
27 const ImageFormatType format_type,
28 std::string &out_filepath,
29 ImageMetaData &out_metadata);
30
31bool make_tx(const string &filepath,
32 const string &out_filepath,
33 ustring colorspace,
34 const ImageAlphaType alpha_type,
35 const ImageFormatType format_type);
36
37ustring make_tx_get_file_colorspace(const ImageMetaData &metadata);
38
#define CCL_NAMESPACE_END
ustring make_tx_get_file_colorspace(const ImageMetaData &metadata)
bool resolve_tx(const string &filepath, const string &texture_cache_path, ustring colorspace, const ImageAlphaType alpha_type, const ImageFormatType format_type, string &out_filepath, ImageMetaData &out_metadata)
bool make_tx(const string &filepath, const string &out_filepath, ustring colorspace, const ImageAlphaType alpha_type, const ImageFormatType format_type)
ImageAlphaType
Definition types_image.h:61
ImageFormatType
Definition types_image.h:72