Additionally if the supplied path is referencing an AISS icon and the icon is missing, the absolute path will also be returned.
Code: Select all
Global base
base = {}
Const #AISSFOLDER = "tbimages:" ; stick this in your main routine somewhere.
;; base:LoadBrush(constant, path$)
Function base:LoadBrush(constant, path$)
Local res, image = IsPicture(path$)
ExitOnError(False)
LoadBrush(constant, path$, {LoadAlpha = image.Alpha, Loader = InBuilt})
If GetLastError() > 0 and FindStr(path$, #AISSFOLDER) > -1
Return(False,path$)
Else
Return(True)
EndIf
ExitOnError(True)
EndFunction