The reasoning behind this function is that large textures take a long time to load from .jpg, and fast loading formats (the quickest being .dds if i remember right) take up a lot of space, which is problematic if you want people to download and play your game.
The idea is that .jpg versions of textures are included in the game folder with the .exe.
The function checks to see if a dds texture of the filename requested is available- if the program is running for the first time there won't be so it loads the .jpg instead. The program then saves out a .dds version so it can load more quickly next time.
I find this useful because i have 1024x1024 textures that take about 3s to load in jpeg format. The .dds ones load in a fraction of this time.
function _load_image_special(name$,num)
ddsname$=name$+".dds"
if file exist(ddsname$)
load image ddsname$,num
else
load image name$+".jpg",num
save image ddsname$,num
endif
endfunction