HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ImfImageIO.h
Go to the documentation of this file.
1
//
2
// SPDX-License-Identifier: BSD-3-Clause
3
// Copyright (c) Contributors to the OpenEXR Project.
4
//
5
6
#ifndef INCLUDED_IMF_IMAGE_IO_H
7
#define INCLUDED_IMF_IMAGE_IO_H
8
9
//----------------------------------------------------------------------------
10
//
11
// Functions to load flat or deep images from OpenEXR files
12
// and to save flat or deep images in OpenEXR files.
13
//
14
//----------------------------------------------------------------------------
15
16
#include "
ImfUtilExport.h
"
17
18
#include "
ImfImage.h
"
19
#include "
ImfImageDataWindow.h
"
20
21
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
22
23
24
//
25
// saveImage (n, h, i, d) or
26
// saveImage (n, i)
27
//
28
// Saves image i in an OpenEXR file with name n. The file will be
29
// tiled if the image has more than one level, or if a header, h, is
30
// given and contains a tile description attribute; otherwise the
31
// file will be scan-line based. The file will be deep if the image
32
// is deep; otherwise the file will be flat.
33
//
34
// If header h is given, then the channel list in h is replaced with
35
// the channel list in i, and the levelMode and the levelRounding mode
36
// fields of the tile description are replaced with the level mode
37
// and the levelRounding mode of i. In addition, if the data window
38
// source flag, d, is set to USE_IMAGE_DATA_WINDOW, then the data
39
// window in the image is copied into the header; if d is set to
40
// USE_HEADER_DATA_WINDOW, then the data window in the header is
41
// replaced with the intersection of the original data window in the
42
// header and the data window in the image. The modified header then
43
// becomes the header of the image file.
44
//
45
// Note: USE_HEADER_DATA_WINDOW can only be used for images with
46
// level mode ONE_LEVEL.
47
//
48
49
IMFUTIL_EXPORT
50
void
51
saveImage
52
(
const
std::string
&fileName,
53
const
Header
&hdr,
54
const
Image
&
img
,
55
DataWindowSource
dws =
USE_IMAGE_DATA_WINDOW
);
56
57
IMFUTIL_EXPORT
58
void
59
saveImage
60
(
const
std::string
&fileName,
61
const
Image
&
img
);
62
63
//
64
// loadImage (n, h) or
65
// loadImage (n)
66
//
67
// Loads deep an image from the OpenEXR file with name n, and returns
68
// a pointer to the image. The caller owns the image and is responsible
69
// for deleting it.
70
//
71
// If header h is given, then the header of the file is copied into h.
72
//
73
74
IMFUTIL_EXPORT
75
Image
*
76
loadImage
77
(
const
std::string
&fileName,
78
Header
&hdr);
79
80
IMFUTIL_EXPORT
81
Image
*
82
loadImage
83
(
const
std::string
&fileName);
84
85
86
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
87
88
#endif
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition:
ImfNamespace.h:80
ImfImage.h
string
GLsizei const GLchar *const * string
Definition:
glcorearb.h:814
Image
Definition:
Image.h:45
DataWindowSource
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER enum IMFUTIL_EXPORT_ENUM DataWindowSource
Definition:
ImfImageDataWindow.h:23
saveImage
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMFUTIL_EXPORT void saveImage(const std::string &fileName, const Header &hdr, const Image &img, DataWindowSource dws=USE_IMAGE_DATA_WINDOW)
IMFUTIL_EXPORT
#define IMFUTIL_EXPORT
Definition:
ImfUtilExport.h:51
img
GLint void * img
Definition:
glcorearb.h:556
ImfUtilExport.h
USE_IMAGE_DATA_WINDOW
USE_IMAGE_DATA_WINDOW
Definition:
ImfImageDataWindow.h:25
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition:
ImfNamespace.h:79
Header
Definition:
ImfHeader.h:39
ImfImageDataWindow.h
loadImage
IMFUTIL_EXPORT Image * loadImage(const std::string &fileName, Header &hdr)
OpenEXR
ImfImageIO.h
Generated on Thu Mar 28 2024 03:45:32 for HDK by
1.8.6