安装u8数据源配置:Riot.dll 用于图像处理

来源:百度文库 编辑:偶看新闻 时间:2024/04/28 06:01:55

Developer reference guide

Riot.dll can be used with any programming language capable of using dynamic link libraries. This includes C/C++, Visual Basic, C#, Object Pascal/Delphi, Perl. Other programming languages have experimental or more difficult to implement support for DLLs : PHP, Java, Python. Even if you can’t find here your favourite programming language, probably it has a good method of working with DLLs anyway.

Riot.dll Export Functions

bool RIOT_LoadFromDIB ( HANDLE hDIB, HWND hwndParent=NULL, const char *fileName=”", const char *iniFile=”", int flags=0, const char *buf=”")

Show the optimizer and load a bitmap from a DIB handle. Returns true on success or false on failure

bool RIOT_LoadFromDIB_U(HANDLE hDIB, HWND hwndParent=NULL, const wchar_t *fileName = LPWSTR(“”), const char *iniFile=”", int flags=0)

Unicode version of LoadFromDIB with buf parameter missing (not used anyway)

bool RIOT_LoadFromFile(const char *filename, int flags=0)

Show the optimizer and load a picture from a file on disk. flags parameter is unused Return true on success or false on failure

bool RIOT_LoadFromFile_U(const wchar_t *filename, int flags=0)

Unicode version of LoadFromFile with some parameters missing

void RIOT_Show()

Show the optimizer with no file loaded

int GetPlugInInfo(char *versionString, char *fileFormats)

Sets plugin information Always returns 0

bool RIOT_SaveToFile(HANDLE hDIB, HWND hwndParent,const char *fileName,const char *origFilename=”", unsigned long byteSize=0,char *errorText=”",int flags=0, char *buf=”")

Saves the file with the specified parameters.

Parameters:
hDIB – handle to a Windows DIB image in memory
hwndParent – Not Used. Must be NULL.
fileName – full path to the file to be saved (only JPEG is supported)
origFilename – Fill this with the original file name if the DIB is not different than the image from the file
byteSize – filesize of the compressed JPEG image in bytes
errorText – On error errorText is filled with the error message
flags – save flags. See bellow
buf – not used. Leave blank.THe function returns true on success or false on error.If you specify byteSize you can specify any of the save flags, but the quality will not be used.
If you don’t specify byteSize flags are used.
If there are no flags or byteSize is 0 an error is thrown.Flags for RIOT_SaveToFile:0×0001 – keep EXIF
0×0002 – keep IPTC
0×0004 – keep XMP
0×0008 – keep Comments
0×1000 – keep ICC profile0x0800 – save greyscale
0×2000 – save progressive
0×10000 – disable chroma subsamplingAlso you can set a quality flag from 1 to 100Ex: flags=JPEG_SUBSAMPLING_444 | JPEG_PROGRESSIVE | 90
results in a file with no subsampling, progressive with a quality of 90
If you don’t specify quality 75 is used.
You must specify JPEG_PROGRESSIVE if you want progressive.
If you don’t specify JPEG_SUBSAMPLING_444 a default chroma of 4:2:0 is used.

bool RIOT_SaveToFile_U (HANDLE hDIB, HWND hwndParent, const wchar_t *fileName, const wchar_t *origFilename=LPWSTR(“”), unsigned long byteSize=0, char *errorText=”", int flags=0)

Unicode version of SaveToFile

Functions not present in RIOT Lite:

bool RIOT_LoadFromHBITMAP(HBITMAP hbmp)

Show the optimizer and load a bitmap from a HBITMAP handle Returns true on success or false on failure