hey all,
does anyone know of any good image gallery scripts in PHP that DONT require anything extra installed on the server (ie. image magic)
thanx :D
Printable View
hey all,
does anyone know of any good image gallery scripts in PHP that DONT require anything extra installed on the server (ie. image magic)
thanx :D
Really making your own is not hard to do. If you really want a script you will like its best to write it yourself so you can include features that you specifically want.
If you are interested it doing it yourself read these:
- Grabbing the image from the database:
http://209.120.143.185/showthread.ph...ghlight=upload
- Uploading the image:
http://209.120.143.185/showthread.ph...ghlight=upload
If you have any questions or need help, just ask.
-Matt
to make thumbnails you will need to use
What this does is I decided I wanted the width to be 370px and so I found out what percentage of the width it took to make the image 370 and then I applied that percentage to the height of the image so the distortion was not too terrible.PHP Code:<?php
$imageSize = getimagesize("projects/PHP/images/Banner Exchange.gif");
$heightPercentage = 370/$imageSize[0];
$height = $heightPercentage * $imageSize[1];
?>
<a href="projects/PHP/images/Banner Exchange.gif" target="_blank"><img
src="projects/PHP/images/Banner Exchange.gif" width="370px" height="<?php print "$height"; ?>"
border="0px" alt="Click to Enlarge"></a>
You can decrease the width to whatever size you want but be sure to change both the <img> tag and the $heightPercentage formula (along with the image paths.
-Matt
hey wow!! thaks HEAPS for the help :D the pics might be a fair bit distorted as the are screenshots coming form 1152x864 down to about 300x200 but i dont mind, thats great.
thanks heaps!
Glad that helps.
If you get stuck anywhere else just keep posting :D
another thing might be to use GD... most hosts have it installed....
What is GD and where can I read about it?
the GD library? image creation
it wouldn't help this guys, he already has the images.
hmm... that script that cpradio posted looks great. My only question is, does it kill the load time of the page? instead of loading, say a 96x96 image you're loading a 400x400 that is shrunken down to the height and width of a 96x96. Maybe I'm misunderstanding this but dont you load the enlarged image and then shrink it down to the size you specify. If I'm wrong, I'll definatley be using cpradio's script instead of creating and storing the image twice on the server using a Photoshop batch program. Take a look at what I mean...
http://www.visualwow.com/pages/gallery.php?event=1214
This is the demo gallery... we got the thumbnails (96x96) on the left side, you click on one and it brings up the enlarged file (400x400). Now I can save a lot of server space if I only need to make one image file, store it and shrink it down. That is, if the load time doesnt get killed because it has to load the enlarged images (I get calls about the site being slow from people on their 56K's all the time)
Thanks
[ On a side note, I think the site redesign for vbforums is just great. Simple, clean and effective. :D ]
Well, unfortunately you are right about it loading the larger image and just downsizing it.
Most images I use that script for are never over 25k so its not a big deal for me however it can be if your images exceed that amount.
Sorry.
-Matt
If I am correct... GD can manipulate already existing images... and resize them.. no server space will be taken, since it is made at run time
well yuou could use imagecopyesampled() but it doesn't say anything about an existing image. also need GD 2.0.1 and php4.0.6 for it to work.
hmmm.. i thought of that but my host doesnt support it :(