Climbing photos, and photo metadata stuff

Replies:

Parents:

  • None.
I finally got around to spending some time on my photo metadata
management software, and used it on some cool photos we took on
the weekend while rock climbing in Gatineau Park:

   http://impressive.net/people/gerald/2001/09/08/climbing.html

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

--
Gerald Oskoboiny <[email protected]>
http://impressive.net/people/gerald/

Re: Climbing photos, and photo metadata stuff

Replies:

Parents:


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

* Gerald Oskoboiny <[email protected]> [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 <[email protected]> - 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:[email protected]">[email protected]</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--

Re: Climbing photos, and photo metadata stuff

Replies:

  • None.

Parents:

On Tue, 11 Sep 2001, Hugo Haas wrote:

> 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

I do:
1/ put pictures in the right directory
2/ add metadata using java -jar rdfpic.jar <directory>/*
3/ generate thumbnails (in png) and index file[s] using a single script,
  genepage
And if I'm lazy I just skip 2, but it is bad.
Having metadata stored aside from the picture always makes me nervous, as
it is very easy to have them out of sync or to lose one.

> 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?

To rotate a picture, try jpegtran, lossless and it keep all the comments
and app_specific blocks (with the right options). Pretty cool tool present
in the default jpeg library sources, as well as rdjpgcom and wrjpgcom to
update comments (rdf in my case).

--
~~Yves

Re: Climbing photos, and photo metadata stuff

Replies:

  • None.

Parents:

On Tue, Sep 11, 2001 at 06:46:58AM -0700, Hugo Haas wrote:
> * Gerald Oskoboiny <[email protected]> [2001-09-11 04:35-0400]
> > 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.

Oops, sorry aboot that. Actually, when I said "usable" I meant
that I finally had something I could use to add captions to my
photos, not necessarily that anyone else would be able to use it.

> 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.

For now, I still generate thumbnails using make_thumbnails (and
medium-sized versions using make_meds; lately I have been thinking
of creating yet another size in between those two versions)

Then I would run "captivate $L" where L is a variable defined in
my .bashrc, equal to "??-??-??.jpg" (L is short for "large images")
But of course you couldn't have known that. Anyway, I just modified
captivate so "captivate *" will do the Right Thing.

> 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.
> :-)

OK. Actually, I should create a new $HOME/.captivate.rdf and tell the
user to edit it and then run captivate again. I'll do that later.

I made a todo list:
http://impressive.net/people/gerald/2000/09/photo.html#mine-todo

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

Fixed.

> How do you put a set of pictures online?

Pretty much the same as you, except now I run "captivate *" before
make_image_index. One of the next things I want to add to captivate
is a replacement for make_image_index (so the indexes can have
good alt text, etc.)

> If you rotate a picture, are
> you not losing the EXIF information? If so, can your script handle
> this?

Currently I don't rotate many images, but when I do I save them
as a new file, 12-34-56r.jpg, and just don't link to the
non-rotated ones. captivate won't handle that very well.

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

Hey, you know what Homer Simpson says:

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

--
Gerald Oskoboiny <[email protected]>
http://impressive.net/people/gerald/

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny