Re: Climbing photos, and photo metadata stuff

by Hugo Haas <hugo@larve.net>

 Date:  Tue, 11 Sep 2001 06:46:58 -0700
 To:  fogo@impressive.net
 References:  gerald
 Replies:  ylafon gerald2

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

* Gerald Oskoboiny <gerald@impressive.net> [2001-09-11 04:35-0400]
> sample individual photo on a nice HTML page:
> 
>     http://impressive.net/people/gerald/2001/09/08/13-36-10-med.html
> 
> There's still lots more work needed, but at least it's mostly usable now.
> 
> I also made a page to keep track of related stuff:
> 
>     Photo metadata software/notes
>     http://impressive.net/people/gerald/2000/09/photo.html

Very, very cool.

However, could you please make a "Captivate for dummies" page. I guess
that I could figure it out with some investigation, but I am not sure
when and how you generate the thumbnails, on what you run captivate,
etc.

I saw:

  You should put some default values in /home/hugo/.captivate.rdf.
  Sample: http://impressive.net/people/gerald/misc/dotfiles/captivate.rdf

You should pause for a few seconds here, because I would never have
seen those messages if I hadn't piped the whole output into a file.
:-)

Also, I got a bunch of "Use of uninitialized values" but I can't
reproduce that apparently.

Here is what I currently do:

  1. Put my pictures in a directory, named HH_MM_SS.jpg.
  2. Make thumbnails, generating HH_MM_SS-sm.jpg, by running:
     make_thumbnails *.jpg
  3. Generate an index page: make_image_index *sm.jpg > my_index.html
  4. Edit this page: vi my_index.html

make_thumbnails is the script you wrote on 11 January 1999.
make_image_index is a slightly improved and customized version of your
original version of 11 January 1999. I am attaching them both for
archival purposes.

How do you put a set of pictures online? If you rotate a picture, are
you not losing the EXIF information? If so, can your script handle
this?

Finally, a remark: RDF documents on impressive.net are served as
text/plain.

-- 
Hugo Haas <hugo@larve.net> - http://larve.net/people/hugo/
Kids, just because I don't care doesn't mean I'm not listening. --
Homer J. Simpson

--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=make_thumbnails

#!/usr/bin/perl
#
# make_thumbnails: create a thumbnail version of each image named in @ARGV
#
# Gerald Oskoboiny, 7 Feb 1999
#
# $Id$

$thumb_suffix	= "-sm";
$border_size	= 1;
$total_height	= 128;
$thumb_height	= $thumb_total_height - ( 2 * $bordersize );
$convert	= "convert";
$convert_opts	=
    "-bordercolor '#000' -border ${border_size}x${border_size} -dither ";

foreach $file (@ARGV) {

    if ( ! -r $file ) {
        print STDERR "Can't read $file! skipping it...\n";
	next;
    }

    $thumb_name = $file;
    $thumb_name =~ s/\./${thumb_suffix}./;

    if ( -f $thumb_name ) {
        print STDERR "Thumbnail $thumb_name already exists! skipping it...\n";
	next;
    }

    system "$convert -geometry x$total_height $convert_opts $file $thumb_name";

    print "Done $file\n";

}

exit;


--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=make_image_index

#!/bin/sh
#
# make_image_index: make a foo.html page with a bunch of inline
# images on it.
#
# usage: make_image_index *.jpg > index.html
#
# Gerald Oskoboiny, 11 Jan 1999
# Modified by Hugo Haas
#
# $Id$

echo $@ | fmt -1 | sed 's/.*/<a href="&"><img src="&" alt="&"><\/a>/; s/-sm//; s/alt="[^"]*\(..\)_\(..\)_\(..\)-sm.jpg"/alt="\1:\2:\3"/;' > mii.$$
wwwis mii.$$ > mii.$$.wwwis

cat <<EOHD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">

<head>
  <title>Photos: @@</title>
  <link rel="stylesheet" type="text/css" href="/stylesheets/pictures">
</head>

<body>

<h1>@@</h1>

<hr>

<p>
EOHD

cat mii.$$ 

cat <<EOHD
</p>

<hr>

<p>
  <em><small>Last modified: \$Date\$<br>
  Copyright &copy; `date +%Y` <a href="/people/hugo/">Hugo Haas</a>, &lt;<a
  href="mailto:hugo@larve.net">hugo@larve.net</a>&gt;<br>
  See my <a href="/people/hugo/pictures/public">public picture page</a>.<br>
  See my <a href="/people/hugo/pictures/">picture page</a> (restricted).</small></em>
</p>

</body>

</html>
EOHD

cat mii.$$.wwwis >&2

rm mii.$$ mii.$$.old mii.$$.wwwis


--h31gzZEtNLTqOjlF--

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny