Blender  V2.93
image_oiio.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2020 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __IMAGE_OIIO__
18 #define __IMAGE_OIIO__
19 
20 #include "render/image.h"
21 
23 
24 class OIIOImageLoader : public ImageLoader {
25  public:
26  OIIOImageLoader(const string &filepath);
28 
29  bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) override;
30 
31  bool load_pixels(const ImageMetaData &metadata,
32  void *pixels,
33  const size_t pixels_size,
34  const bool associate_alpha) override;
35 
36  string name() const override;
37 
38  ustring osl_filepath() const override;
39 
40  bool equals(const ImageLoader &other) const override;
41 
42  protected:
43  ustring filepath;
44 };
45 
47 
48 #endif /* __IMAGE_OIIO__ */
ustring osl_filepath() const override
Definition: image_oiio.cpp:227
bool equals(const ImageLoader &other) const override
Definition: image_oiio.cpp:232
bool load_pixels(const ImageMetaData &metadata, void *pixels, const size_t pixels_size, const bool associate_alpha) override
Definition: image_oiio.cpp:166
ustring filepath
Definition: image_oiio.h:43
OIIOImageLoader(const string &filepath)
Definition: image_oiio.cpp:25
bool load_metadata(const ImageDeviceFeatures &features, ImageMetaData &metadata) override
Definition: image_oiio.cpp:33
string name() const override
Definition: image_oiio.cpp:222
#define CCL_NAMESPACE_END