Remembering the GD Library?
Its hard to remember anyone got any tips on remembering basic GD?
I read them, but the fact of me remembering them is a hard task for some reason, like the only thing I can't remember PHP wise.
||03-25-2008 05:00 PM
We should make a "cheat sheet"!
||03-25-2008 05:01 PM
Make some notes keep them nearby when you're coding something. :-)
||03-25-2008 06:00 PM
Don't know if all, but almost all GD functions start with image :)
imagecolorallocate.. imageline.. etc
and the arguments are pretty much the same
image resource, x, y, w, h
image resource from_x, from_y, to_x, to_y...
||03-25-2008 11:11 PM
What i do is think of an application that would need me to use alot of different GD functions and then just keep adding to it and sooner or later you kind of just remember them.
** How to get an image from a resource
# Set the header
# 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!
# generate it as a png file
* Make your own IMages!~!!!!!! YAYYAYAY
**/# Set the header
$x = 200;
$y = 100;
$r = mt_rand(0,255);
$g = $r;
$b = $g;
$im = imagecreatetruecolor($x,$y);
$col = imagecolorallocate($im, $r,$g,$b);
|All times are GMT. The time now is 02:33 PM.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0