Reputation: 46780
I need the a function like imagecreatefrompng(), but I want to pass in the image directly (as opposed to the filename). Is this possible?
Note: I need this because the image is coming from a blob in a database.
Upvotes: 2
Views: 738
Reputation: 32532
Yes, you can use imagecreatefromstring()
ttp://us2.php.net/manual/en/function.imagecreatefromstring.php
Upvotes: 2
Reputation: 490243
It should detect it is a png
from the image header and return an image resource.
Upvotes: 4