replaced getimagesizefromstring