RIOT as IrfanView plug-in
You can acces the RIOT plug-in from IrfanView by selecting File->Save for web. Also, there is an option to set file size to use compress to size function in RIOT for JPEG images.
RIOT as XnView addon
The RIOT addon for XnView is accesible after installing by selecting Filter->RIOT if an image is viewed or Tools->Plugin->RIOT in the XnView file browser.
RIOT as GIMP plug-in
The RIOT for GIMP plug-in is available in the GIMP repository. After you install the GIMP plug-in you can access it by selecting File->Save for web using RIOT.
RIOT is available also as a DLL for developers. Programmers can freely use this DLL as a plugin for their applications. The licence states among other things:
You may use RIOT.DLL in your applications as a plugin and deploy it, provided that such copies contain all the original Product’s contents and proprietary notices
RIOT plugin can be used to provide a image saving method for your applications especially when this feature would be a nice extra and you preffer to use a third party component for that rather than program it from scratch.
Possible uses of the RIOT plugin:
- an image viewer that wants to add the “Save for web” feature or compress to size
- a graphic editing program or a photo editor that wants to add the “Save for web” feature or compress to size
- a computer program that is not mainly intended to process images but lets user export the results as images
- a web application might need “Compress to size” to limit the filesize of uploaded images. An interface to use the DLL in a web application is needed for this.
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
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.
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:0x0001 – keep EXIF
0x0002 – keep IPTC
0x0004 – keep XMP
0x0008 – keep Comments
0x1000 – keep ICC profile0x0800 – save greyscale
0x2000 – save progressive
0x10000 – 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