Fix Bug 1246

Use imagecreatefromstring replace imagecreatefrompng