|
-
Jun 27th, 2002, 12:46 AM
#1
Thread Starter
Lively Member
PHP Image Gallery
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
There's something I've noticed in the last year or so...
Australian's are good at EVERYTHING !!!
-
Jun 27th, 2002, 10:57 AM
#2
Fanatic Member
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
-
Jun 28th, 2002, 10:15 PM
#3
Fanatic Member
to make thumbnails you will need to use
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>
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.
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
-
Jun 29th, 2002, 05:35 AM
#4
Thread Starter
Lively Member
hey wow!! thaks HEAPS for the help 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!
There's something I've noticed in the last year or so...
Australian's are good at EVERYTHING !!!
-
Jun 29th, 2002, 10:03 AM
#5
Fanatic Member
Glad that helps.
If you get stuck anywhere else just keep posting
-
Jul 1st, 2002, 10:30 PM
#6
Junior Member
another thing might be to use GD... most hosts have it installed....
-
Jul 2nd, 2002, 05:53 AM
#7
Fanatic Member
What is GD and where can I read about it?
-
Jul 2nd, 2002, 07:45 AM
#8
the GD library? image creation
it wouldn't help this guys, he already has the images.
-
Jul 2nd, 2002, 08:28 AM
#9
Addicted Member
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. ]
-
Jul 2nd, 2002, 08:58 AM
#10
Fanatic Member
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
Last edited by cpradio; Jul 2nd, 2002 at 09:02 AM.
-
Jul 2nd, 2002, 12:55 PM
#11
Junior Member
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
-
Jul 2nd, 2002, 01:30 PM
#12
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.
-
Jul 2nd, 2002, 08:28 PM
#13
Thread Starter
Lively Member
hmmm.. i thought of that but my host doesnt support it
There's something I've noticed in the last year or so...
Australian's are good at EVERYTHING !!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|