2011-08-24 108 views

回答

1

当您使用imagecreatefrom ...方法时,图像将作为未压缩的位图加载到内存中。此时并没有真正的图像类型。您可以将其保存为您希望使用图像...功能的任何类型。

$img = imagecreatefromstring($data); 

imagepng($img, "file path and name"); 

imagedestroy($img); 

http://us2.php.net/manual/en/function.imagecreatefromstring.php

+0

确定,但从检测的onload点有什么样的? – Marcin

+0

你试图达到的最终目标是什么?你是否希望确定你所加载的内容实际上是一张图片还是你真的需要知道加载的图片的确切类型? – Bueller