Re: How creat image pointer from JPG/GIF string?
| From: | Robert Cummings | Date: | Tue, 09 Apr 2002 20:52:48 +0000 |
| Subject: | Re: How creat image pointer from JPG/GIF string? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92301@lists.php.net to get a copy of this message | ||
M wrote:
>
> Hello, you know all GD functions work via image pointer , which appoints
> to some file, or else empty image
>
> $img_pointer = imagecreatefromjpeg("$image_file_name");
>
> or
>
> $img_pointer = imagecreate($width,$height);
>
> I have stored lot of images into BLOB Mysql fields, and need recover it
> to resize. How can I create some image pointer from string stored into
> BLOB field?
>
> Thanks
>
> Miguel
imagecreatefromstring() seems to be the candidate... however a comment
attached to the help page indicates it is buggy. I suggest trying it out
and if that fails then pull your image from the database, write to a
temporary file, and then use imagecreatefromjpeg() as per usual.
Cheers,
Rob.
--
.-----------------.
| Robert Cummings |
:-----------------`----------------------------.
| Webdeployer - Chief PHP and Java Programmer |
:----------------------------------------------:
| Mail : mailto:robert.cummings@webmotion.com |
| Phone : (613) 731-4046 x.109 |
:----------------------------------------------:
| Website : http://www.webmotion.com |
| Fax : (613) 260-9545 |
`----------------------------------------------'