Open Reality Reference Guide
 
Loading...
Searching...
No Matches
fbimage.h
Go to the documentation of this file.
1#ifndef __FBIMAGE_H__
2#define __FBIMAGE_H__
3/**************************************************************************
4 Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5 All Rights Reserved.
6
7 The coded instructions, statements, computer programs, and/or related
8 material (collectively the "Data") in these files contain unpublished
9 information proprietary to Autodesk, Inc. and/or its licensors, which is
10 protected by Canada and United States of America federal copyright law
11 and by international treaties.
12
13 The Data may not be disclosed or distributed to third parties, in whole
14 or in part, without the prior written consent of Autodesk, Inc.
15 ("Autodesk").
16
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24 FREE.
25
26 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36
37**************************************************************************/
38
43#include <kaydaradef.h>
44#ifndef FBSDK_DLL
48 #define FBSDK_DLL K_DLLIMPORT
49#endif
50
51#include <fbsdk/fbcomponent.h>
52
53#ifdef FBSDKUseNamespace
54 namespace FBSDKNamespace {
55#endif
56
59
62 kFBImageFormatRGBA32,
63 kFBImageFormatRGB24,
64 kFBImageFormatBGRA32,
65 kFBImageFormatBGR24,
66 kFBImageFormatBGR16,
67 kFBImageFormatABGR32,
68 kFBImageFormatARGB32,
69 kFBImageFormatUnknown
70};
71
74 kFBImageTypeFrame,
75 kFBImageTypeField
76};
77
80 kFBImageInterleaveTypeFullFrame,
81 kFBImageInterleaveTypeOdd,
82 kFBImageInterleaveTypeEven,
83 kFBImageInterleaveTypeAverage
84};
85
88 kFBImageInterpolationTypeNone,
89 kFBImageInterpolationTypeDuplicate,
90 kFBImageInterpolationTypeLinear
91};
92
93FB_DEFINE_ENUM(FBSDK_DLL, ImageFormat);
94FB_DEFINE_ENUM(FBSDK_DLL, ImageType);
95FB_DEFINE_ENUM(FBSDK_DLL, ImageInterleaveType);
96FB_DEFINE_ENUM(FBSDK_DLL, ImageInterpolationType);
97
99// FBImage
101
105{
106 //--- Open Reality declaration.
108
109public:
114 FBImage(const char* pFileName, HIObject pObject=NULL);
115
118 virtual void FBDelete() override;
119
122 void Cleanup();
123
124
131 bool Init(FBImageFormat pFormat, int pWidth, int pHeight);
132
133
137 unsigned char* GetBufferAddress();
138
143 bool ConvertFormat(FBImageFormat pNewFormat);
144
150 bool ConvertSize(int pWidth, int pHeight);
151
155
162 K_DEPRECATED_2024 bool WriteToTif(const char* pFileName, const char* pComments, bool pCompressed);
163
171 bool WriteToDisk(const char* pFileName, const char* pComments, int pQuality, int pCompressionType);
172
177 K_DEPRECATED_2024 bool IsCompressedTif(const char* pFileName);
178
182 FBPropertyImageFormat Format;
183 FBPropertyImageType Type;
184 FBPropertyImageInterleaveType InterleaveType;
185 FBPropertyImageInterpolationType InterpolationType;
186};
188
189#ifdef FBSDKUseNamespace
190 }
191#endif
192
193#endif /* this must be the last line of this file */
MotionBuilder SDK base class.
Image class.
Definition fbimage.h:105
FBPropertyImageInterpolationType InterpolationType
Read Only Property: Image interpolation type.
Definition fbimage.h:185
FBPropertyImageFormat Format
Read Write Property: Image data format.
Definition fbimage.h:182
FBImage(const char *pFileName, HIObject pObject=NULL)
Constructor.
FBPropertyInt Height
Read Write Property: Height of the image in pixels.
Definition fbimage.h:180
bool ConvertSize(int pWidth, int pHeight)
Convert the image size.
virtual void FBDelete() override
Virtual FBDelete function.
K_DEPRECATED_2024 bool WriteToTif(const char *pFileName, const char *pComments, bool pCompressed)
Write image data to a TIF file on disk.
K_DEPRECATED_2024 bool IsCompressedTif(const char *pFileName)
Query TIF file about its compressed status.
unsigned char * GetBufferAddress()
Access image data buffer, allow modifications.
void VerticalFlip()
Flip the image vertically.
FBPropertyImageType Type
Read Only Property: Image type, refering to either frame or field.
Definition fbimage.h:183
FBPropertyInt Width
Read Write Property: Width of the image in pixels.
Definition fbimage.h:179
bool WriteToDisk(const char *pFileName, const char *pComments, int pQuality, int pCompressionType)
Write image data to a file on disk.
FBPropertyInt Depth
Read Write Property: Color depth of the image.
Definition fbimage.h:181
bool ConvertFormat(FBImageFormat pNewFormat)
Convert the image data format to another format.
bool Init(FBImageFormat pFormat, int pWidth, int pHeight)
Init.
void Cleanup()
Cleanup image data, making it black.
FBPropertyImageInterleaveType InterleaveType
Read Only Property: Image interleave type. Only meaningful if image type is field.
Definition fbimage.h:184
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBImageInterpolationType
Image interpolation types.
Definition fbimage.h:87
FBImageType
Image types.
Definition fbimage.h:73
FBImageInterleaveType
Image field interleave types.
Definition fbimage.h:79
FBImageFormat
Image formats.
Definition fbimage.h:61
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68