]> mj.ucw.cz Git - gallery.git/blob - FORMAT
Highslide: Fix page jumps when closing thumbnails
[gallery.git] / FORMAT
1 List of photos (gallery.list)
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 One photo per line, tab-separated columns:
4
5         File name (relative to OrigDir in config)
6         Identifier (16 hex digits)
7         Orientation: one of "l", "r", "d", "."
8         Transformation -- sequence of:
9                 n       normalize contrast
10                 s       sharpen
11                 h       equalize histogram
12         Title (UTF-8 string)
13
14 Lines starting with "#" are ignored.
15
16 Lines starting with a tab add further attributes to the previous photo.
17 The following attributes are recognized:
18
19         lat             geographic latitude in degrees north of equator
20         lon             geographic longitude in degrees east of Greenwich
21         alt             geographic altitude in meters
22         t               time when the photo was taken (2014-01-25 09:40:12)
23
24
25 Importing meta-data from other sources
26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 Occasionally, you want to add photos from a source which already provides
28 some meta-data. In this case, you can construct a gallery.list with a subset
29 of fields, or feed the stdin of "gal scan" with such a list.
30
31 For convenience, orientation, transformation and title can be also given
32 as named attributes. They are called "orientation", "xf", and "title".
33
34
35 Photo meta-data (PhotoDir/gallery.meta or CacheDir/cache.meta)
36 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 Perl Storable containing a single hash.
38
39 $meta->{photo}->{$identifier} is a hash of:
40         o               orientation
41         xf              transformation applied
42         w               width after scaling
43         h               height after scaling
44         w0, h0          width and height of original image
45         title           photo title
46         fmt             photo format (png/jpg; defaults to jpg)
47         lat             geographic latitude in degrees north of equator
48         lon             geographic longitude in degrees east of Greenwich
49         alt             geographic altitude in meters
50         t               time when the photo was taken (2014-01-25 09:40:12)
51
52 The rest is present in cache.meta only:
53
54 $meta->{sequence} is an array of photo IDs as they appear in the gallery.
55
56 $meta->{thumb}->{$format}->{$identifier} is a hash of:
57         w               thumbnail width
58         h               thumbnail height