_ImageDescription, AddImageTag, Get_ImageInfo, LoadImageDescription, LoadImageFullDescription, SaveImageDescription, SaveImageFullDescription
Description
AddImageTag( char *Filename
, char *LimDescription
, dwordBgColor
, char *LimAuthor
);
Adds tags to the selected file.
Description
int Get_ImageInfo( char *Filename
, int *LpWidth
, int *LpHeight
, int *LpBpc
, int *LpPlaneCount
);
This function obtains width, height, bit depth and a number of channels of the specified image. The function is applied to the current image when the Filename parameter is left blank.
Parameters
Description
INT LoadImageDescription( char *Filename
, char *Descr1
, char *Descr2
, char *Descr3
, char *Descr4
);
This function fills buffers descr1, descr2, descr3, descr4 with image description saved along with the image data.
If filename == NULL (0), only memory archive items are overwritten, you can change them also by selecting Information menu from the application system menu.
Parameters
Return Values
// LoadImageDescription example - lets you load and change the image descriptions. word day, month, year; dword dw; char caption[256],sdate[256]; char cont[10000],file[256],file1[256]; char d1[63],d2[63],d3[63],d4[2047]; char d1_[63],d2_[63],d3_[63],d4_[2047]; int qw; dw=Get_Date(); year = HIWORD(dw); month=HIBYTE(LOWORD(dw)); day=LOBYTE(LOWORD(dw)); sprintf(sdate,"%i-%i-%i","day,month,year"); sprintf(caption,"API Example - LoadImageDescription.Date: %s","sdate"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Wait(2); sprintf(caption," Select the image.\tdate: %s ","sdate"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); SelectFile(file,"Lim Images|*.lim|",0); LoadImageDescription(file,d1_,d2_,d3_,d4_); if(d1_[0] == 0) strcpy(d1," "); else strcpy(d1,d1_); if(d2_[0] == 0) strcpy(d2," "); else strcpy(d2,d2_); if(d3_[0] == 0) strcpy(d3," "); else strcpy(d3,d3_); if(d4_[0] == 0) strcpy(d4," "); else strcpy(d4,d4_); sprintf(cont,"File:\n%s\n\nInfo 1:\n%s\n\nInfo 2:\n%s\n\nInfo 3:\n%s\n\nInfo 4:\n%s\n","file,d1,d2,d3,d4"); Int_CreateWindow(1,"File description",6,0,0,400,460,cont,1,1,0.00000,1,1,1,"Arial,B,8"); qw = Int_Question("API Example","Modify file description?","&Yes","&No","","",1,0); if(qw==BUTTON_1) { again1: strcpy(caption,"Select the action."); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); qw = Int_Question("API Example, ","What do you want to modify?","&Filename","&Descriptions","&Exit","",1,0); if(qw==BUTTON_1) { sprintf(caption,"Modify the filename.Old filename: %s","file"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); strcpy(file1,file); Int_GetString("API Example","Modify the filename:",file1,256); RenameFile(file1,file); strcpy(file,file1); sprintf(cont,"File:\n%s\n\nInfo 1:\n%s\n\nInfo 2:\n%s\n\nInfo 3:\n%s\n\nInfo 4:\n%s\n","file,d1,d2,d3,d4"); Int_SetWindowText(1,cont,0); goto again1; } if(qw==BUTTON_2) { strcpy(caption,"Select the description you want to modify."); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); qw = Int_Question("API Example","Select desription:","No.1","No.2","No.3","No.4",1,0); if(qw==BUTTON_1) { strcpy(caption,"Write new description No.1"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_GetString("API Examle","Modify the description No.1",d1_,63); if(d1_[0] == 0) strcpy(d1,""); else strcpy(d1,d1_); SaveImageDescription(file,d1_,d2_,d3_,d4_); } if(qw==BUTTON_2) { strcpy(caption,"Write new description No.2"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_GetString("API Example","Modify the description No.2",d2_,63); if(d2_[0] == 0) strcpy(d2,""); else strcpy(d2,d2_); SaveImageDescription(file,d1_,d2_,d3_,d4_); } if(qw==BUTTON_3) { strcpy(caption,"Write new description No.3"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_GetString("API Example","Modify the description No.3",d3_,63); if(d3_[0] == 0) strcpy(d3,""); else strcpy(d3,d3_); SaveImageDescription(file,d1_,d2_,d3_,d4_); } if(qw==BUTTON_4) { strcpy(caption,"Write new description No.4"); Int_CreateTextWindow(caption,0,RGB(0,0,128),RGB_WHITE,100); Int_GetString("API Example","Modify the description No.4",d4_,2047); if(d4_[0] == 0) strcpy(d4,""); else strcpy(d4,d4_); SaveImageDescription(file,d1_,d2_,d3_,d4_); } sprintf(cont,"File:\n%s\n\nInfo 1:\n%s\n\nInfo 2:\n%s\n\nInfo 3:\n%s\n\nInfo 4:\n%s","file,d1,d2,d3,d4"); Int_SetWindowText(1,cont,0); goto again1; } if(qw==BUTTON_3) goto end; } end: Int_CloseTextWindow(); Int_SetWindowState(1,WS_DESTROY);
See Also
Get_ImageCalibration
Description
int LoadImageFullDescription( char *Filename
, char *LimOptics
, char *LimType
, char *LimSampleID
, char *LimAuthor
, char *LimDescription
, char *ImageID
, char *Group
, char *Capturing
, char *Sampling
, char *Location
, char *Jp2Date
, char *Conclusion
, char *Info1
, char *Info2
);
This function retrieves the full image description saved along with the image data.
If the filename is NULL (0), the current image description is loaded.
Parameters
LimOptics
Description of the optics used during acquisition. Filled on output. This description item is supported by the LIM, JPEG2000, TIFF and ND2 image formats.
LimType
Description of a type of the image. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output. This description item is supported by LIM and JPEG2000 image format.
LimSampleID
Sample identification. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output. (This description item is supported by LIM and JPEG2000 image format.)
LimAuthor
Name of the author of the image. Maximum length is 63 characters. This description item is supported by LIM and JPEG2000 image format.
ImageID
Image identification. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output.
Group
Image group description. Maximum length is 63 characters. This description item is supported by JPEG2000 image format.
Capturing
Image capturing description. May contain e.g. capturing conditions etc. Maximum length is 2047 characters. This description item is supported by JPEG2000, TIF, and ND2 image formats.
Sampling
Description of Sampling saved within the image metadata. This description item is supported by JPEG2000, TIFF, and ND2 image formats.
Location
Description of a location - part of the image information metadata. Maximum length is 63 characters. This description item is supported by JPEG2000, TIFF and ND2 image formats.
Jp2Date
Date of the image creation. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output. This description item is supported by JPEG2000 image format.
Conclusion
Conclusion description. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output.
Return Values
See Also
LoadImageDescription
Description
int SaveImageDescription( char *Filename
, char *Descr1
, char *Descr2
, char *Descr3
, char *Descr4
);
This function changes the image description of the specified image.
If the Filename is NULL (0), only memory archive items are overwritten. You can change them also by selecting the Information menu from the application system menu.
Parameters
Return Values
See Also
LoadImageDescription, Get_ImageCalibration, SaveImageCalibration, Get_Calibration
Description
SaveImageFullDescription( char *Filename
, char *LimOptics
, char *LimType
, char *LimSampleID
, char *LimAuthor
, char *LimDescription
, char *ImageID
, char *Group
, char *Capturing
, char *Sampling
, char *Location
, char *Jp2Date
, char *Conclusion
, char *Info1
, char *Info2
);
This function changes the whole image description of the specified image.
Parameters
LimOptics
Description of the optics used during acquisition. Filled on output. This description item is supported by the LIM, JPEG2000, TIFF and ND2 image formats.
LimType
Description of a type of the image. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output. This description item is supported by LIM and JPEG2000 image format.
LimSampleID
Sample identification. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output. (This description item is supported by LIM and JPEG2000 image format.)
LimAuthor
Name of the author of the image. Maximum length is 63 characters. This description item is supported by LIM and JPEG2000 image format.
Group
Image group description. Maximum length is 63 characters. This description item is supported by JPEG2000 image format.
Capturing
Image capturing description. May contain e.g. capturing conditions etc. Maximum length is 2047 characters. This description item is supported by JPEG2000, TIF, and ND2 image formats.
Sampling
Description of Sampling saved within the image metadata. This description item is supported by JPEG2000, TIFF, and ND2 image formats.
Location
Description of a location - part of the image information metadata. Maximum length is 63 characters. This description item is supported by JPEG2000, TIFF and ND2 image formats.
Jp2Date
Date of the image creation. Maximum length is 63 characters. Macro is responsible for the buffer allocation. Filled on output. This description item is supported by JPEG2000 image format.
Conclusion
Conclusion description. This description item is supported by JPEG2000 image format.
Return Values
See Also
SaveImageDescription, SaveImageCalibration, Get_Calibration
This function runs the File > Image Properties command.
Description
_ImageDescription();
This function displays the Image Properties dialog window with information about the current image.