Making thumbnails for 30,000+ pics on a server

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
My boss wants me to find a way to make thumbnails for 30,000+ pictures on the company website (I work for a car dealership). The company website is hosted on a Windows server running IIS.
I'm thinking of using ImageMagick to make the thumbnails, hoping that it would be faster than Photoshop. My boss also wants me to find a script that can be set to run weekly and make sure that all of the pictures have thumbnails. Can I do that with ImageMagick command line switches or would I need something like a batch file? Thanks in advance.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
ImageMagick would be my choice for doing the thumbnails, that really sucks that you are stuck on windows, it would be pretty easy on *nix (although I guess it could be easy on windows too, I just don't personally know how to go about it). To check that all pictures have thumbnails just sounds like a shell script type thing. But then you don't have a shell .. :p Maybe python. Python works well on windows, probably wouldn't require a reboot, and could do it easily.
 

bpctech

Senior member
Sep 6, 2001
483
0
0
just use photoshop to make the thumbnails. Who cares if it's not so fast...here's what you do:

start the batch process, go to lunch, chat up some ladies, chill in your office, and done!

yes it would be relatively easy to write a shell script and make a weekly cron job if you were in unix, but since your in windows, it might be possible to do in a batch file...or you could learn some cgi and make a program that you can run right on the server.
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
Thanks for the responses guys. The problem is that I don't actually have physical access to the server so I need to keep this as simple as possible. Otherwise, the server admins might not be willing to do it. Asking them to install Python AND ImageMagick may be a little too much. :p Plus, I've never written anything in Python.

notfred, I'll look into GD if it's faster than ImageMagick. Thanks.

I looked into using ASP and ImageMagick but a site that I found on Google said that I need to write some wrappers in Perl to do it.

What if I just wrote a C++ or VB program to check the images and call on ImageMagick? It doesn't need to be accessible through the web so it doesn't need to be a CGI program.
 

AgaBoogaBoo

Lifer
Feb 16, 2003
26,108
5
81
You could write a program to bring all the images to your computer, then use ImageMajick on your computer, have it save it in the right place, and then upload once its done. This is the complicated way, but if the admins won't let you use it on the server-side, I guess this is waht you'll have to do.
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
Originally posted by: AgaBooga
You could write a program to bring all the images to your computer, then use ImageMajick on your computer, have it save it in the right place, and then upload once its done. This is the complicated way, but if the admins won't let you use it on the server-side, I guess this is waht you'll have to do.

Well, I do have FTP access. I meant to say that I don't have physical access to the computer (no Telnet/SSH either). Sorry about that. And I don't really want to download and then upload 30,000 pictures...
 

skace

Lifer
Jan 23, 2001
14,488
7
81
If there is a way to do it in Unix via the shell, I don't see how it would be that hard to put it in a batchfile. If all you are doing is calling a program via command line switches per thumbnail / etc. You would use for statements.

IE:
for /f %%i in ('dir /b \\pictureserver\pics') do call :thumbnailroutine "%%i"
goto :eof

:thumbnailroutine
someprogram -someswitch "%~1"
goto :eof

But, I don't know what you are using or anything. All you would need is a program that converted via command line.
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
Thanks for the tip. I modified it a little and it works great.

@echo off

IF NOT EXIST thumbnails mkdir thumbnails

for /F "delims=?" %%i in ('dir /b /A-D *.jpg') do IF NOT EXIST thumbnails\%%i (
echo Creating thumbnail for %%i...
convert +profile * -quality 75 "%%i" -resize 95x71 "thumbnails\%%i"
echo Done.)

My boss decided that I should download the, now, 40,000+ pics, create thumbnails and upload them again. I just ran the script on about 1000 of the pics and it worked beautifully. :) It's very satisfying just watching it work.