This function contains functions exported from Imaging dynamic link library.
All string are exported as PChars and all var parameters are exported as pointers. All posible exceptions getting out of dll are catched.