note 97679 modified in wrappers.data by danbrown

From: Date: Sun, 02 May 2010 22:35:49 +0000
Subject: note 97679 modified in wrappers.data by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168867@lists.php.net to get a copy of this message
If you want to create a gd-image directly out of a sql-database-field you might want to use: <?php $jpegimage = imagecreatefromjpeg("data://image/jpeg;base64," . base64_encode($sql_result_array['imagedata'])); ?> this goes also for gif, png, etc using the correct "imagecreatefrom$$$"-function and mime-type. --was-- If you want to create a gd-image directly out of a sql-database-field you might want to use: $jpegimage = imagecreatefromjpeg("data://image/jpeg;base64," . base64_encode($sql_result_array['imagedata'])); this goes also for gif, png, etc using the correct "imagecreatefrom$$$"-function and mime-type. http://php.net/manual/en/wrappers.data.php

« previous php.notes (#168867) next »