 |
 |
Creating thumbnail images of uploaded files
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2003
Location: USA
Status:
Offline
|
|
I'm part of a group looking to create sort of an open source website where registered users could upload files (graphics, presentations, audio files, etc.) for others to download for use in their line of work.
We also want to create preview images/thumbnails of each file (.ppt, .doc, etc.). What's the best way to do that (keeping in mind multiple users will upload files)? I suppose those who are running the site will need to create thumbnails, right? Is there a way to automate this or will it need to be done manually for each file? And, what application(s) would you recommend to achieve this?
Hope this makes sense. Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Aug 2001
Location: Durango CO
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
I'd recommend imagemagik as well, or netPBM
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2003
Location: USA
Status:
Offline
|
|
Thanks. I was looking at ImageMagick so I appreciate the recommendations.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
This inspires me to ask a related question:
Right now, I use an AppleScript (which calls Image Events and my FTP client, Transmit) to generate thumbnails and images, sort them into the correct directories, and upload/sync them to my website in one step. It's pretty groovy. I know I could probably use ImageMagick to generate the thumbnails automatically rather than storing two copies of each image, but this approach I've created is so delightfully easy that I wonder if changing it would be worth the bother.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: CO
Status:
Offline
|
|
Selo:
Are you marketing your AppleScript  ...or wanting to open-source it?
<-- always up for learning from the coding of someone smarter!
|
|
TOMBSTONE: "He's trashed his last preferences"
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
Originally Posted by Love Calm Quiet
Selo:
Are you marketing your AppleScript  ...or wanting to open-source it?
<-- always up for learning from the coding of someone smarter!
Oh, heck no. It's just a simple script and I'm glad to share it. Here it is:
Code:
on open draggedItems
repeat with currentFile in draggedItems
tell application "System Events"
set home_directory to (path to current user folder) as string
end tell
-- change next two lines according to your needs
set image_folder to (home_directory & "Sites:barridoff:2006:images")
set thumbnail_folder to (home_directory & "Sites:barridoff:2006:thumbnails")
set image_path to image_folder
set thumbnail_path to thumbnail_folder
try
tell application "Image Events"
launch
set openedFile to open (currentFile as alias)
set properties of openedFile to {bit depth:millions of colors, color space:RGB, resolution:{72.0, 72.0}}
scale openedFile to size 750
save openedFile as JPEG in image_path with icon
scale openedFile to size 125
save openedFile as JPEG in thumbnail_path with icon
close openedFile
end tell
on error error_message
display dialog error_message
end try
end repeat
end open
tell application "Transmit"
set theDoc to (make new document)
tell theDoc
tell current session
-- change next three lines to suit your needs
connect to favorite with name "Barridoff"
set your stuff to "~/Sites/Barridoff/2006/"
set their stuff to "2006/"
list local folder
list remote folder
synchronize direction upload files method update
end tell
end tell
end tell
It's not that useful unless you have Transmit. I save it as droplet and it works awesomely.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: CO
Status:
Offline
|
|
Awesome, Selo.
That's very kind.
|
|
TOMBSTONE: "He's trashed his last preferences"
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: CO
Status:
Offline
|
|
Selo:
PS: Thinking about your sig... Do you think we *could* get them all to gather in one place if we gave them a state? heh heh heh...
|
|
TOMBSTONE: "He's trashed his last preferences"
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Nov 2003
Location: Rockville, MD
Status:
Offline
|
|
Originally Posted by Love Calm Quiet
Selo:
PS: Thinking about your sig... Do you think we *could* get them all to gather in one place if we gave them a state? heh heh heh...
I wish Hamas no harm. I just want them to stop killing Jews for the sake of killing Jews (or for any other reason, for that matter).
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|