Go to the
documentation of this file.
00001 #ifndef __FBIMAGE_H__
00002 #define __FBIMAGE_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL
00045
00048 #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050
00051 #include <fbsdk/fbcomponent.h>
00052
00053 #ifdef FBSDKUseNamespace
00054 namespace FBSDKNamespace {
00055 #endif
00056
00057 __FB_FORWARD( FBImage );
00058 FB_DEFINE_COMPONENT( FBSDK_DLL, Image );
00059
00061 enum FBImageFormat {
00062 kFBImageFormatRGBA32,
00063 kFBImageFormatRGB24,
00064 kFBImageFormatBGRA32,
00065 kFBImageFormatBGR24,
00066 kFBImageFormatBGR16,
00067 kFBImageFormatABGR32,
00068 kFBImageFormatARGB32,
00069 kFBImageFormatUnknown
00070 };
00071
00073 enum FBImageType {
00074 kFBImageTypeFrame,
00075 kFBImageTypeField
00076 };
00077
00079 enum FBImageInterleaveType {
00080 kFBImageInterleaveTypeFullFrame,
00081 kFBImageInterleaveTypeOdd,
00082 kFBImageInterleaveTypeEven,
00083 kFBImageInterleaveTypeAverage
00084 };
00085
00087 enum FBImageInterpolationType {
00088 kFBImageInterpolationTypeNone,
00089 kFBImageInterpolationTypeDuplicate,
00090 kFBImageInterpolationTypeLinear
00091 };
00092
00093 FB_DEFINE_ENUM(FBSDK_DLL, ImageFormat);
00094 FB_DEFINE_ENUM(FBSDK_DLL, ImageType);
00095 FB_DEFINE_ENUM(FBSDK_DLL, ImageInterleaveType);
00096 FB_DEFINE_ENUM(FBSDK_DLL, ImageInterpolationType);
00097
00099
00101
00104 class FBSDK_DLL FBImage : public FBComponent
00105 {
00106
00107 __FBClassDeclare(FBImage, FBComponent);
00108
00109 public:
00114 FBImage(char* pFileName, HIObject pObject=NULL);
00115
00118 virtual void FBDelete();
00119
00122 void Cleanup();
00123
00124
00131 bool Init(FBImageFormat pFormat, int pWidth, int pHeight);
00132
00133
00137 unsigned char* GetDataBuffer();
00138
00143 bool ConvertFormat(FBImageFormat pNewFormat);
00144
00150 bool ConvertSize(int pWidth, int pHeight);
00151
00154 void VerticalFlip();
00155
00162 bool WriteToTif(char* pFileName, char* pComments, bool pCompressed);
00163
00168 bool IsCompressedTif(char* pFileName);
00169
00170 FBPropertyInt Width;
00171 FBPropertyInt Height;
00172 FBPropertyInt Depth;
00173 FBPropertyImageFormat Format;
00174 FBPropertyImageType Type;
00175 FBPropertyImageInterleaveType InterleaveType;
00176 FBPropertyImageInterpolationType InterpolationType;
00177 };
00179
00180 #ifdef FBSDKUseNamespace
00181 }
00182 #endif
00183
00184 #endif