Blender
V5.0
source
blender
imbuf
intern
format_psd.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#include "
oiio/openimageio_support.hh
"
10
11
#include "
IMB_filetype.hh
"
12
13
#include "
IMB_imbuf_types.hh
"
14
15
OIIO_NAMESPACE_USING
16
using namespace
blender::imbuf
;
17
18
bool
imb_is_a_psd
(
const
uchar
*mem,
size_t
size
)
19
{
20
return
imb_oiio_check
(mem,
size
,
"psd"
);
21
}
22
23
ImBuf
*
imb_load_psd
(
const
uchar
*mem,
size_t
size
,
int
flags,
ImFileColorSpace
&r_colorspace)
24
{
25
ImageSpec config, spec;
26
config.attribute(
"oiio:UnassociatedAlpha"
, 1);
27
28
ReadContext
ctx{mem,
size
,
"psd"
,
IMB_FTYPE_PSD
, flags};
29
30
/* PSD should obey color space information embedded in the file. */
31
ctx.
use_metadata_colorspace
=
true
;
32
33
return
imb_oiio_read
(ctx, config, r_colorspace, spec);
34
}
uchar
unsigned char uchar
Definition
BLI_sys_types.h:67
IMB_filetype.hh
IMB_FTYPE_PSD
@ IMB_FTYPE_PSD
Definition
IMB_imbuf_enums.h:24
IMB_imbuf_types.hh
size
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition
btDbvt.cpp:52
imb_is_a_psd
bool imb_is_a_psd(const uchar *mem, size_t size)
Definition
format_psd.cc:18
imb_load_psd
ImBuf * imb_load_psd(const uchar *mem, size_t size, int flags, ImFileColorSpace &r_colorspace)
Definition
format_psd.cc:23
blender::imbuf
Definition
IMB_interp.hh:19
blender::imbuf::imb_oiio_read
ImBuf * imb_oiio_read(const ReadContext &ctx, const ImageSpec &config, ImFileColorSpace &r_colorspace, ImageSpec &r_newspec)
Definition
openimageio_support.cc:283
blender::imbuf::imb_oiio_check
bool imb_oiio_check(const uchar *mem, size_t mem_size, const char *file_format)
Definition
openimageio_support.cc:273
openimageio_support.hh
ImBuf
Definition
IMB_imbuf_types.hh:182
ImFileColorSpace
Definition
IMB_filetype.hh:62
blender::imbuf::ReadContext
Definition
openimageio_support.hh:25
blender::imbuf::ReadContext::use_metadata_colorspace
bool use_metadata_colorspace
Definition
openimageio_support.hh:36
Generated on
for Blender by
doxygen
1.16.1