Implement Load*ImageFromMem apis