Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
string に画像があります$data。その画像のサイズを変更する必要があるため、imagewithに変換しimagecreatefromstringます。$dataサイズ変更された画像を変数に戻すにはどうすればよいですか? 私が見つけたのはimagepngその同類だけです。
$data
image
imagecreatefromstring
imagepng
出力バッファリングimagepngで使用:
ob_start(); imagepng($image); $data = ob_get_clean();