|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
File resize?
Im working on a website right now and i made a script in php to upload an image and then display it on a different page. It works very well. My only problem is that i want to be able to turn those images into thumbnails with small file sizes automatically once i upload the file to my server. I don't really know that much php and i have no idea how i would accomplish this
|
|
#2
|
|||||
|
|||||
|
Re: File resize?
I don't know a lot about php either, but I think I saw somewhere that Photoshop has a utility included in it somewhere that allows you to create php galleries similar to Windows Explorer Filmstrip picture viewing... does your team have a copy of PS? Maybe other editors have this same feature (Paint Shop Pro, CoredDRAW, etc.)
Check those out. |
|
#3
|
|||
|
|||
|
Re: File resize?
yes we do have a copy of photoshop but i've never heard of a utility like that. But i also do not know much about photoshop
|
|
#4
|
||||
|
||||
|
Re: File resize?
Download a copy of some forum software like Vbulletin, phpBB, or Invision, open it in Dreamweaver, and do a code search of the entire folder that you have to make into a site for "image resize" or "resize".
|
|
#5
|
||||||
|
||||||
|
Re: File resize?
you'll want another library such as GD or ImageMagick to do the resizing. Googling those should give you plenty of material to get you started.
|
|
#6
|
||||
|
||||
|
Re: File resize?
Quote:
If not, I've done some work on that, you can check this link: http://users.wpi.edu/~woloi/pictures.txt I haven't looked at that since early summer, so I can't say I know what I did, but if you can't figure out what I did, I'd be more than happy to look back at it and help you. I believe the only problem should be mess and such, cause I never actually cleaned that code up. Specifically, look at the following code, though it will need to be modified for your purposes: Code:
function Thumbnails ($pics, $root, $thumbnails) {
#Pre: $pics is filled
#Post: Thumbnails are created for every new picture in directory
if ( !is_dir($thumbnails)) {
mkdir ($thumbnails);
chmod ($thumbnails, 0755);
}
else if (is_dir ($thumbnails)) {
for ($i = 0; $i < count($pics); $i++) {
if (!is_file($thumbnails . '/' . $pics[$i])) {
exec ("convert $root/$pics[$i] -resize 150x150 +profile '*' $thumbnails/$pics[$i]");
chmod ("$thumbnails/$pics[$i]", 0755);
}
}
|
|
#7
|
|||
|
|||
|
Re: File resize?
In CPanel, does Fantastico have anything useful? (providing that you have CPanel and Fantastico)
|
|
#8
|
|||||
|
|||||
|
Re: File resize?
Quote:
|
|
#9
|
||||
|
||||
|
Re: File resize?
Quote:
|
|
#10
|
||||
|
||||
|
Re: File resize?
Quote:
PHP Code:
Last edited by Rickertsen2 : 10-10-2004 at 11:36. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I save a quicktime .mov file? | Elgin Clock | IT / Communications | 20 | 18-03-2005 17:39 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| How do we convert a modified user routines file into a valid .HEX file | HuskieRobotics | Programming | 13 | 28-02-2004 12:12 |
| Dashv2.ocx dependency file now available | archiver | 2000 | 0 | 23-06-2002 22:00 |
| Improving PBASIC: Request for Comments | Greg Ross | Programming | 19 | 16-02-2002 22:14 |