| | | 
Progenic Family

Group: Forum Members Last Login: Yesterday @ 7:35 PM Posts: 531, Visits: 1,366 |
| I need some php pointers
If anyone has something like this please share
I need a script that when you add an image and it creates a thumb to it it will also resize images that are bigger then a given number of pixels
If anyone knows or has anything like this please share |
| | | | 
Progenic Family

Group: Old Skool Last Login: Today @ 3:45 PM Posts: 1,073, Visits: 2,304 |
| GD Library will allow you to do this. It will have to be installed on the server, if not already there...should be though.
I'm not at home to give you one of my resize scripts...will be home on Sat.
But I found the pointers online...this is what I recall.
To get the image size:
$im=imagecreatefromstring($fileContent) (I loaded it through BLOB) $width=imagesx($im) $heigh=imagesy($im)
And then to create the image resized would be:
$resize=ImageCreateTrueColor($imgw,$imgh)
// imgw is what you wanna resize the image to. So you'd set it earlier imgw=640, and imgh is the height. Duh.
And finally, the most important thing which took me forever to find. This is to resample the image, take out all the jagged lines upon resizing. Otherwise it looks crap-o-la.
ImageCopyResampled (I forget the parameters, there are a zillion )
Oh crap, also almost forgot. Clearing the memory.
imagedestroy ($im) imagedestroy ($resize)
OK. I know this doesn't help. But with some g**gle power. You'll find some script to help you more than me...this is all I recall until I see the script on my computer.
------------- Is Beezer gonna have to choke Google Adsense? |
| | | | 
Progenic Family

Group: Forum Members Last Login: Yesterday @ 7:35 PM Posts: 531, Visits: 1,366 |
| Thanks a lot
This helps a lot helping me learn some new php commands which I am always up for Please do share a ready made script to whenever you can ...sorry still not good enough to make my own ...thanks a whole lot bro |
| | | | 
Progenic Family

Group: Forum Members Last Login: Today @ 9:25 AM Posts: 335, Visits: 1,963 |
| Learn it, make some effort.
I'll do it for 10 bucks. |
| | | | 
Progenic Family

Group: Forum Members Last Login: Yesterday @ 7:35 PM Posts: 531, Visits: 1,366 |
| i'd pay if it were for my site
btw you got a real php tutorial site
not the crap you find in google and not quite php.org ..a bit to complicated .. |
| | | | 
Progenic Family

Group: Old Skool Last Login: Today @ 3:45 PM Posts: 1,073, Visits: 2,304 |
| | Two websites that helped me a lot when I forgot something were: http://www.dbforums.com/ http://www.php-mysql-tutorial.com/ The 2nd one is good, but there are instructions missing so you'll have to figure out the problems on your own when stuff doesn't work out the way you want. BTW, messaged you the code.
------------- Is Beezer gonna have to choke Google Adsense? |
| | | | 
Progenic Family

Group: Forum Members Last Login: Yesterday @ 7:35 PM Posts: 531, Visits: 1,366 |
| thanks a whole lot bro |
| |
|
|