Function Definitions
IMGLIB_015_API bool RGB_to_BW( ImgClass *Img ); |
NAME:
FUNCTION: POSTED ERRORS: NOTE: |
typedef void(*PF)
(int,int); //
pointer to a progress function |
NAME: FUNCTION:
Allows user tod define his Read and or Write Progress functions
If SetRW_Progress(..) is not called,or the arguments are NULL. RETURN: POSTED ERRORS: NOTE: Rd_Prog is a pointer
to a local Read_Progress function I have created a global function: ReadProgress( int TotalLines, int Current_Line);
Then a function pointer was cerated as and ReadProgress is passed to the pointer: Prog = &RdProgress; Then SetRW_Progress(..) is called
In this case one function handles both Read and Write EXAMPLE of ReadProgress(...);
CProgressCtrl m_Progress; //define somewhere
void ReadProgress(int TotalLines, int Current_Line) static int TotalNoLines =0; // keep track of the total no of lines // this will change hopefully for different images if ( TotalLines != TotalNoLines) // to initiate you may call ReadProgress(0,0) |
IMGLIB_015_API
char *GetDll_Version(); |
NAME:
char *GetDll_Version(); FUNCTION: RETURN: Char Pointer to the LibVersionString POSTED ERRORS: NONE NOTE: |
IMGLIB_015_API bool GetSingleColor(ImgClass *In,ImgClass *Out,int color); |
NAME:
bool GetSingleColor ImgClass *In, FUNCTION: Obtain a single
color chanel from a RGB or BW Image. The single color Image is returned in Out, Color Representation: color = 0 Red; RETURN:
true on any ERROR POSTED ERRORS: 1] "GetSingleColor::ImgClass::In
is NULL" 2] "GetSingleColor ImgClass::Out
is NULL" 3] "GetSingleColor::
color out of range [0,1,2]" 4] "GetSingleColor::
In->ImgData = NULL" 5] "GetSingleColor::
Can't Get %d color out of B/W image",color); 6] "GetSingleColor::
Output memory allocation ERROR" NOTE: GetSingleColor(ImgClass
*In,ImgClass *Out,int color) |
IMGLIB_015_API bool YCCtoRGB(ImgClass *In); |
NAME: bool YCCtoRGB(ImgClass *In); FUNCTION: Converts a YCC image to RGB Algorithm:
r -= 128; Y = r+b;
Cb = r - 0.3341*g - 0.7142*b;
*Dptr++ = (byte)Y + 128; RETURN:
true on any ERROR POSTED ERRORS:
1] "YCCtoRGB Image is NULL" NOTE: |
IMGLIB_015_API bool RGBtoYCC(ImgClass *In); |
NAME: bool RGBtoYCC(ImgClass *In); FUNCTION:
Convert RGB Image to YCC
r -= 128; Y = 0.299*(r - g)
+ g + 0.114*(b-g); RETURN: POSTED ERRORS:
1] "RGBtoYCC Image is NULL"
2] "RGBtoYCC Image is BW" NOTE: There is sub-sumpling
done for the YCC Image |
IMGLIB_015_API bool OPen_Inet(void); |
NAME: bool OPen_Inet(void); FUNCTION: Opens a network
connection to the Image Server RETURN:
true on any ERROR POSTED ERRORS: 1] "OPen_Inet: Can't
determine TEMP path" 2] "Icom_FTP::OpenFTP:Invalid
Server URL" 3] All of Microsoft CInternetExceptions NOTE: The Image Server communicates via FTP with the library |
IMGLIB_015_API bool Close_Inet(); |
NAME: FUNCTION: RETURN: POSTED
ERRORS: NOTE: |
IMGLIB_015_API char *Get_Last_Error(); |
NAME: FUNCTION: RETURN: char * to the Error POSTED ERRORS: NONE NOTE: Obtain the last
execution Library Error |
IMGLIB_015_API bool Put_Server( char *ServerInfo); |
NAME: bool Put_Server( char *ServerInfo); FUNCTION: Assign the Library Server info. RETURN:
true on any ERROR POSTED ERRORS: "Put_Server ServerInfo is NULL"; NOTE: Host may be ommited
but then ServerInfo must start with a leading ',' as ",Server,User,Password" |
IMGLIB_015_API char *Get_Server(); |
NAME: char *Get_Server(); FUNCTION: Get a pointer to
the Library Server info string RETURN:
char * to the ServerInfo POSTED ERRORS: NOTE: Get the server Information as set by Put_Server(...) |
IMGLIB_015_API bool Get_Remote_File( char *RemoteFileName, char *LocalFileName, int Wait); |
NAME:
FUNCTION: Obtain RemoteFile from the
Server and copy it to LocalFile
"CCOM_Tii_Obj_010::Get_Remote_File(..)
File %s exists",LocalFileName); RETURN:
true on any ERROR NOTE: Get_Remote_File does
not check for the presence of remote file and times
out after Wait seconds |
IMGLIB_015_API bool GetRemoteDir(char *Dir,char *Files, int FileLenght, int NoFiles); |
NAME: bool GetRemoteDir FUNCTION:
Obtain the remote directory and place it into Files RETURN:
NOTE: |
IMGLIB_015_API bool PlaceCommand( char *LocalFile ); |
NAME:
bool PlaceCommand( char *LocalFile );
places the command file Localfile, to the Image Server command dirctory RETURN:
true on any ERROR POSTED
ERRORS:
"Icom_FTP::SendCommandToServer: No Server connection" NOTE: Copy Local Command File to the ImageServer
Used internally DO NOT USE !! |
IMGLIB_015_API char *ZoomImageRemote |
NAME: char *ZoomImageRemote FUNCTION:
Error stack is cleared on entry
The crop region is generated from the eoriginal image and subsampled to
the Parameters: Xpos, Ypos: Center of the desired Zoom region in display coordinates. Magnification: Desired ZoomFactor
Quality: JPG quality factor 1 to 100
Image:
Name of the ImageHeader file to be Zoomed.
Crop: If empty, indicates that ImgW x ImgH reprsents
the entire Image.
RETURN:
POSTED
ERRORS:
NOTE:
|
IMGLIB_015_API char
*ZoomImageLocal int Xpos, int Ypos, ); |
NAME: char *ZoomImageLocal FUNCTION: See ZoomImageRemote above. RETURN:
ERROR: an empty string as "" POSTED ERRORS: NOTE: |
IMGLIB_015_API char
*ZoomImageLocal int Xpos, int Ypos, ); |
NAME: char *ZoomImageLocal FUNCTION: See ZoomImageRemote above. RETURN:
POSTED ERRORS: NOTE:Produce an output Image from a source Image |
IMGLIB_015_API char
*ZoomImageLocal |
NAME: char *ZoomImageLocal FUNCTION: See ZoomImageRemote above. RETURN: NORMAL EXIT: ImageName of the generated zoomed
Inage. ERROR: an empty string as "" POSTED ERRORS: NOTE:Produce an output Image from a source Image Produce an output file from a source file same as ZoomImageRemote slow, try to avoid using it |
IMGLIB_015_API bool
GetCropImage |
NAME:
FUNCTION:
RETURN:
POSTED ERRORS: NOTE: |
IMGLIB_015_API char*
GetCropImageRemote int ImgW, ); |
NAME:
FUNCTION: Same as GetCropImage(...) RETURN: NORMAL EXIT: ERROR: POSTED ERRORS: NOTE: |
IMGLIB_015_API char *Get_Temp_Path(); |
NAME: char *Get_Temp_Path(); FUNCTION: return the current Dll's temp path. RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: return the current Dll's temp
path. |
IMGLIB_015_API bool Reset_IcomDb(); |
NAME: IMGLIB_015_API bool Reset_IcomDb(); FUNCTION: RETURN:
POSTED ERRORS: NOTE: Reset all the Dll parameters. |
IMGLIB_015_API bool Make_Local_Header(char *ImageFile,char *OutFile); |
NAME: bool Make_Local_Header(char *ImageFile,char *OutFile); FUNCTION: Produce a loacal Header. If OutFile is an ampty string or
NULL, then the Header file RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Make_Local_Tnl(int Quality, int Size, char *HdrFile,char *Outfile); |
NAME:
FUNCTION: Produce a loacal Thumbnail file.
RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Make_Local_Tnl(int Quality, int Size, char *HdrFile,char *Outfile,ImgClass *Src); |
NAME:
FUNCTION: Produce local thumbnail file Size is the width of the output
image in pixels. Aspect ratio is preserved. RETURN: true on any ERROR POSTED ERRORS: NOTE: |
IMGLIB_015_API double Get_Aspect( char *HdrFile); |
NAME: double Get_Aspect( char *HdrFile); FUNCTION: Get the iamge Aspect ratio from a Header file RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE:returns the Image Aspect ratio.( Width /Height ) |
IMGLIB_015_API bool Get_Image_Dimension( char *HdrFile,int *Width, int *Height); |
NAME: FUNCTION: Get the Image Dimensions from a Header file RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: Obtain the Image Width and Heigth |
IMGLIB_015_API bool Get_Image_Res( char *HdrFile,double *Xres, double *Yres, int *ResType); |
NAME:
FUNCTION: Get the Image resolution fro a Header file Xres, Yres: X-Y Resolution. RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool ReadImage( bool RGBSwap, ImgClass *Img ); |
NAME: bool ReadImage( bool RGBSwap, ImgClass *Img ); FUNCTION: RGBSwap: rue Swap the Red and Blue channels of an Image false No action Special: RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool ScaleImage(ImgClass *From, double XScale, double YScale, ImgClass *To); |
NAME:
FUNCTION: Scale Image From to To by XScale
and YScale // if YScale == -1.0 the Image aspect ratio is preserved RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Low_Memory_ScaleImage ( bool Compress, ImgClass *From, char *To, double XScale, double YScale); |
NAME:
FUNCTION: Slow but low memory usage: RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool SubsampleLocalImage(ImgClass *In, ImgClass *Out,int OutX,int OutY); |
NAME:
FUNCTION: Subsample Image In to
Out RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE:This function wil also resample the mage if OutX is greater then Image no of pixels. |
IMGLIB_015_API bool
WriteTIFF(bool compress, bool bgr,ImgClass * Out); |
Various write routines. |
IMGLIB_015_API bool GetImageRectangle(char *File, CRect Rct, ImgClass *Img); |
NAME: bool GetImageRectangle (char *File, CRect Rct, ImgClass *Img); FUNCTION: Get a crop rectangle, from a fully
qualified image path, File Img: Destination Image RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Convert_Image( char *In, char *Out, int Type, int Quality); |
NAME:
FUNCTION: Convert image from one type to another and write the image out Type must be one of IMG_TYPE TIFF_FILE, Quality is used only for JPEG_FILE RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE:See ImgClass.h for types and IMG_TYPE |
IMGLIB_015_API bool Read_Hdr( char *ImgHdr, IMAGE_HDR *hdr); |
NAME: bool Read_Hdr( char *ImgHdr, IMAGE_HDR *hdr); FUNCTION: RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Rotate_Image( ImgClass *InImg, int Rotation); |
NAME: bool Rotate_Image( ImgClass *InImg, int Rotation); FUNCTION: Rotate an Image InImg;
RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Image_Diff ( ImgClass *Src1, ImgClass *Src2, ImgClass *Dest); |
NAME:
FUNCTION: Produce a difference Image between
Src1 and Src2 and place the image into Dest. RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE:
|
IMGLIB_015_API bool GetCropRect( CRect *Crp); |
NAME: bool GetCropRect( CRect *Crp); FUNCTION: Obtain the Library's last used Crop Rectangle, should be used after Zoom RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE: |
IMGLIB_015_API bool Swap_RGB( ImgClass *Img); |
NAME: bool Swap_RGB( ImgClass *Img); FUNCTION: Swap the red and blue channels,
ImgClass keeps the data in RGB RETURN: true on any ERROR false on normal EXIT POSTED ERRORS: NOTE:
|
IMGLIB_015_API bool Post_Error ( char *Str ); |
NAME: bool Post_Error ( char *Str ); FUNCTION: Push the Str on the Error stack RETURN: always true. NOTE: Call Post_Error with an empty string to clear the Error stack as PostError(""); |
IMGLIB_015_API char *Get_FileName_From_HDR( char *HdrFile); |
NAME: char *Get_FileName_From_HDR( char *HdrFile); FUNCTION: Obtain the Image file name file name from a Header file RETURN: char * to the image file name POSTED ERRORS: NOTE: |
IMGLIB_015_API char *MakeTemp_FileName(char *FileName, char *Extention); |
NAME:
char *MakeTemp_FileName(char *FileName, char *Extention); FUNCTION: Convert a FileName, to a fully
qualified file name in the TEMP if Extention is not an empty string, change the file extention to Extention. The extention should not contain the leading '.' RETURN: char * to a temporay
file POSTED ERRORS: NOTE: If FileName is an empty string,
The Temporay path is returned |
IMGLIB_015_API void Set_Temp_Path(char *Tmp_Path); |
set the temporary path to ather then system default |
IMGLIB_015_API void Cleanup( char * Dir); |
Remove all the locally generated temp files from directory reffered to by "Dir" |
IMGLIB_015_API char *Find_File ( char *FileName ); |
Find the first occurence of a file on all the disk drives |
IMGLIB_015_API int Get_File_Type ( char *FileName ); |
Obtain the
recognized image type. |
IMGLIB_015_API void Set_Gamma ( double Gamma, int *Gam_Array, int ArrSize ); |
Calculate a gamma table for specific
Gamma |
IMGLIB_015_API bool IsEmptyFile ( char *FileName );
IMGLIB_015_API bool IsEmptyFile ( char *FileName, __int64 *Size ); |
Returns true if the file refered to by FileName is an empty file ( 0 byte length ). |