Fixed out of memory when load image.