fixed image load bug and fixed platform.cpp