fbsdk/fbimage.h Source File

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
45 
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <fbsdk/fbcomponent.h>
52 
53 #ifdef FBSDKUseNamespace
54  namespace FBSDKNamespace {
55 #endif
56 
57 __FB_FORWARD( FBImage );
59 
70 };
71 
76 };
77 
84 };
85 
91 };
92 
93 FB_DEFINE_ENUM(FBSDK_DLL, ImageFormat);
95 FB_DEFINE_ENUM(FBSDK_DLL, ImageInterleaveType);
96 FB_DEFINE_ENUM(FBSDK_DLL, ImageInterpolationType);
97 
99 // FBImage
101 
105 {
106  //--- Open Reality declaration.
108 
109 public:
114  FBImage(const char* pFileName, HIObject pObject=NULL);
115 
118  virtual void FBDelete();
119 
122  void Cleanup();
123 
124 
131  bool Init(FBImageFormat pFormat, int pWidth, int pHeight);
132 
133 
138  K_DEPRECATED_2014 unsigned char* GetDataBuffer();
139 
143  unsigned char* GetBufferAddress();
144 
149  bool ConvertFormat(FBImageFormat pNewFormat);
150 
156  bool ConvertSize(int pWidth, int pHeight);
157 
160  void VerticalFlip();
161 
168  bool WriteToTif(const char* pFileName, const char* pComments, bool pCompressed);
169 
174  bool IsCompressedTif(const char* pFileName);
175 
183 };
185 
186 #ifdef FBSDKUseNamespace
187  }
188 #endif
189 
190 #endif /* this must be the last line of this file */
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBImageInterleaveType
Image field interleave types.
Definition: fbimage.h:79
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
FBPropertyImageInterpolationType InterpolationType
Read Only Property: Image interpolation type.
Definition: fbimage.h:182
#define NULL
Definition: kaydara.h:169
class FBPropertyBaseEnum< enum FBImageInterpolationType > FBPropertyImageInterpolationType
Definition: fbimage.h:96
FBImageFormat
Image formats.
Definition: fbimage.h:61
FBPropertyImageType Type
Read Only Property: Image type, refering to either frame or field.
Definition: fbimage.h:180
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyInt Width
Read Write Property: Width of the image in pixels.
Definition: fbimage.h:176
Image class.
Definition: fbimage.h:104
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
FBImageInterpolationType
Image interpolation types.
Definition: fbimage.h:87
FBPropertyInt Height
Read Write Property: Height of the image in pixels.
Definition: fbimage.h:177
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbimage.h:48
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBImageType
Image types.
Definition: fbimage.h:73
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
class FBPropertyBaseEnum< enum FBImageInterleaveType > FBPropertyImageInterleaveType
Definition: fbimage.h:95
Basic class definitions.
FBPropertyImageInterleaveType InterleaveType
Read Only Property: Image interleave type.
Definition: fbimage.h:181
#define K_DEPRECATED_2014
Definition: kaydara.h:412
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
class FBPropertyBaseEnum< enum FBImageFormat > FBPropertyImageFormat
Definition: fbimage.h:93
FBPropertyInt Depth
Read Write Property: Color depth of the image.
Definition: fbimage.h:178
class FBPropertyBaseEnum< enum FBImageType > FBPropertyImageType
Definition: fbimage.h:94
FBPropertyImageFormat Format
Read Write Property: Image data format.
Definition: fbimage.h:179