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 
137  unsigned char* GetBufferAddress();
138 
143  bool ConvertFormat(FBImageFormat pNewFormat);
144 
150  bool ConvertSize(int pWidth, int pHeight);
151 
154  void VerticalFlip();
155 
162  bool WriteToTif(const char* pFileName, const char* pComments, bool pCompressed);
163 
168  bool IsCompressedTif(const char* pFileName);
169 
177 };
179 
180 #ifdef FBSDKUseNamespace
181  }
182 #endif
183 
184 #endif /* this must be the last line of this file */
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBImageInterpolationType
Image interpolation types.
Definition: fbimage.h:87
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
FBImageType
Image types.
Definition: fbimage.h:73
FBPropertyImageFormat Format
Read Write Property: Image data format.
Definition: fbimage.h:173
#define NULL
Definition: kaydara.h:179
class FBPropertyBaseEnum< enum FBImageInterleaveType > FBPropertyImageInterleaveType
Definition: fbimage.h:95
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyInt Height
Read Write Property: Height of the image in pixels.
Definition: fbimage.h:171
FBPropertyImageInterpolationType InterpolationType
Read Only Property: Image interpolation type.
Definition: fbimage.h:176
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
Image class.
Definition: fbimage.h:104
FBImageInterleaveType
Image field interleave types.
Definition: fbimage.h:79
class FBPropertyBaseEnum< enum FBImageFormat > FBPropertyImageFormat
Definition: fbimage.h:93
FBPropertyImageType Type
Read Only Property: Image type, refering to either frame or field.
Definition: fbimage.h:174
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbimage.h:48
class FBPropertyBaseEnum< enum FBImageType > FBPropertyImageType
Definition: fbimage.h:94
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyInt Width
Read Write Property: Width of the image in pixels.
Definition: fbimage.h:170
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Basic class definitions.
int pWidth
Definition: fbtool.h:209
MotionBuilder SDK base class.
Definition: fbcomponent.h:664
FBPropertyInt Depth
Read Write Property: Color depth of the image.
Definition: fbimage.h:172
int int pHeight
Definition: fbtool.h:209
class FBPropertyBaseEnum< enum FBImageInterpolationType > FBPropertyImageInterpolationType
Definition: fbimage.h:96
FBImageFormat
Image formats.
Definition: fbimage.h:61
FBPropertyImageInterleaveType InterleaveType
Read Only Property: Image interleave type.
Definition: fbimage.h:175