SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 19th, 1999, 03:22 PM
VBhalla
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
If I had a lot of 800X600 images and I wanted to make thumbnails for all of them is there an easier way of doing this without having to create thumbnails with a graphics program. Can I code this?

Reply With Quote
  #2  
Old July 21st, 1999, 12:27 PM
dmahoney
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Depends on the platform you are using. If you are on a version of Unix (like FreeBSD or Linux) you could use xv (Visual Schnauzer builds thumbnails automatically), and you could easily use a little shell script to call "convert" (part of ImageMagick) to build them.

Reply With Quote
  #3  
Old July 21st, 1999, 08:19 PM
gramie
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
IrfanView (freeware) also has a nice thumbnail creator. Look for it on www.nonags. com, www.tucows.com, or your favourite freeware site.

Reply With Quote
  #4  
Old July 22nd, 1999, 11:37 AM
jamesh
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
On linux (RH5 ish +).
Maybe this is the script dmahoney refers...

for FILE in `ls *.jpg`
do
convert -geom 20% $FILE tmb_$FILE
done

will give you an 20% image of each *jpg file in the directory that you run the script.

James

Reply With Quote
  #5  
Old July 23rd, 1999, 02:36 PM
VBhalla
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
well we are sticking to straight dhtml, html, or java if anyone can help me out with that. I have found something which does automatic thumbnails but its not to clean. I like the linux script, its smart. There has to be a way to do it with java like that?

Reply With Quote
  #6  
Old June 17th, 2000, 06:51 PM
Lurker Lurker is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 1 Lurker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I happened upon this discussion group while doing a web search for automatic thumbnail viewers this morning. One of the replies above hinted at using xv which got me to looking at the xv docs. Turns out the xv ships with djpeg for doing command line conversions, so I hacked up this quick and dirty script. In my case, I have a Kodak DC280 camera which saves all the files with a .JPG extension. The script grabs all these files, creates thumbnails, and builds an index.html with all the thumbnails as links to their bigger version. Not clean code by any means, but it does the job for me. Hope this message board preserves newlines, or this script is gonna look pretty ugly. :-)


#!/bin/sh
#
# Take all the *.JPG images and create a thumbnail version and build
# a web page index. This program uses "djpeg" which comes with xv
#
# Also, scale the original pictures so they'll fit in the browser
# window nicely.

if test -e index.html
then
echo
echo index.html already exists....exiting...
echo
exit
fi

echo
echo creating index.html of thumbnail images
echo
echo "<HEAD>" > index.html
echo "<TITLE> Images </TITLE>" >> index.html
echo "<BODY>" >> index.html

#
# Assume all the images from the camera are name *.JPG
#
for fl in `ls *.JPG |grep -v '.thumb.gif'`
do
newname=`echo $fl |sed -e 's/.JPG$/.thumb.gif/'`
rm -f $newname
echo creating $newname
echo '<img src="' $fl '" width="100%">' > $fl.html
/usr/bin/djpeg -colors 16 -scale 1/50 -gif $fl > $newname
echo '<A HREF="' $fl.html '"><img src="' $newname '"></A>' >> index.html
done

echo "</BODY>" >> index.html

Reply With Quote
  #7  
Old June 17th, 2000, 10:48 PM
firepages's Avatar
firepages firepages is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: Perth West Australia
Posts: 741 firepages User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Have to ask - cos this is out of my territory- but how do file sizes work out using linux/unix etc - ie: do you get the smallest possible file sizes?

If you have a lot of thumbnails to display this is an important point.

I use Fireworks , put all your images in one directory and two mouse clicks later you have another directory full of well formed very small thumbnails - its pretty easy and quick.

I only use fireworks for the final compression of my images but it does it so well it was worth the money.

------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

Reply With Quote
  #8  
Old June 19th, 2000, 09:07 PM
Spookster Spookster is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Posts: 84 Spookster User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I use Macromedia Fireworks as well. It does compression quite well.

Spookster

------------------
Visit the WSAbstract Help Forum for your Javascript, DHTML, or General Web Design Questions

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Automatic Thumbnails


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway