03-26-2008, 12:01 AM
|
#9 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
PHP Code:
<?php
/** ** How to get an image from a resource **/
# Set the header header("Content-Type: image/png"); # if this is empty then it would return an error $file = 'test.jpg'; # create it from $file $im = imagecreatefromjpeg($file);
# Makes it easier for PNG files to have their colors correct! imagesavealpha($im,true);
# generate it as a png file
imagepng($im);
/**End**/
/** * Make your own IMages!~!!!!!! YAYYAYAY **/# Set the header header("Content-Type: image/jpeg"); $x = 200; $y = 100;
$r = mt_rand(0,255); $g = $r; $b = $g;
$im = imagecreatetruecolor($x,$y); $col = imagecolorallocate($im, $r,$g,$b); imagefilledrectangle($im,$x,$y,0,0,$col);
imagejpeg($im);
/**End**/ ?>
__________________
VillageIdiot can have my babbies ;d
Last edited by Orc : 03-26-2008 at 12:22 AM.
|
|
|
|