Preserved Topic: A new and useful toy! (Auto-thumbnailer with PHP) (Page 1 of 1) |
|
---|---|
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 09-03-2002 23:33
Whee! I just did something marvelous, (at least for me, heh!) For years I used this old tempermental PERL script tool that my friend Doug Rau wrote lo, these many years ago, for displaying and generating thumbnails in my old FTP directory on OZONE. The thing is, I never really understood just how it did what it does, and so I couldn't do any of my *own* things with it either, hrmph. I always wanted to write my own one of these scripts, and finally I talked myself into a corner, I needed to do it for my newest client! I shaved bunches of dollars off of his final bill, one of the terms was that I'd develop the needed scripts on my own, which means that I own them. I now one a really neat script, woo! |
Maniac (V) Inmate From: Cell 666 |
posted 09-03-2002 23:49 |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 09-03-2002 23:58
So how does it work internally? Averaging pixel colors? |
Paranoid (IV) Inmate From: cEll 513, west wing of the ninth plain |
posted 09-04-2002 00:34
lovely script Doc .. [tosses you a Doc Otis] |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 09-04-2002 00:49
Most of it is just PHP directory listings, which I save into 2 arrays, one for directories and another for images. (This lets me sort them, and also handle the "next" and "back" links.) The maiking of the thumbnail happens the first time it's going to be called, if it's not there, it copies the file over to a hidden ".minis" directory and then resizes them, like so... |
Paranoid (IV) Inmate From: Dallas, TX |
posted 09-04-2002 01:25
Doesn't seem to like your CSS in Mozilla. (viewed in Moz 1.1) |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 09-04-2002 01:29
How funny I was just working on something like this but in an OOP type structure, I too was using ImageMagick here's what I did (it's a class just because I really like reusing this kind of thing) |
Maniac (V) Inmate From: Brisbane, Australia |
posted 09-04-2002 01:39
Arrr, I trierd to reply when you were moving it... that as weird. That's a great script though! |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 09-04-2002 02:55
Well, the whole goal with this script is not so much to make a "web gallery", but instead to allow you to find the image you want to add to a web page. I've got a drag & drop script I made last month and I was going to allow you to drag the image into your "composing" window, where you can drag the corners to resize it, and add text in other floating <div>'s you can drag around. When you're done, it'll save all of the elements, with the height/width/top/left, then make the correct size image from the big copy in the main archive. I'm betting it's going to work great for my client to build his own pages with, and have a heckuva good "gee whiz" factor too! Much better than letting him continue to use FrontPage?, heh. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 09-04-2002 04:10
done |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 09-04-2002 08:22
The poster has demanded we remove all his contributions, less he takes legal action. |
Maniac (V) Inmate From: Brisbane, Australia |
posted 09-06-2002 01:56
Oooh... I'd love to see that drag an drop script in action. |