1pfsouthdrhtml(1)            General Commands Manual           pfsouthdrhtml(1)
2
3
4

NAME

6       pfsouthdrhtml - Create a web page with an HDR viewer
7

SYNOPSIS

9       pfsouthdrhtml  [<page_name>]  [--quality  <1-5>]  [--image-dir  <direc‐
10       tory_name>] [--page-template <template_file>]  [--image-template  <tem‐
11       plate_file>]     [--object-output     <file_name.js>]    [--html-output
12       <file_name.html>]
13
14

DESCRIPTION

16       The command creates in the current directory an HTML web page  contain‐
17       ing  multi-exposure  HDR  viewer.  The multi-exposure viewer displays a
18       portion of the available dynamic range with  minimum  contrast  distor‐
19       tions  and  provides  a slider control to move the dynamic range window
20       towards brighter or darker tones. The  interface  is  very  similar  to
21       pfsview, which is a pfstools application for displaying HDR images. The
22       web page employs only JavaScript and CSS opacity property and does  not
23       require  Java applets or the Flash plugin. Note that because this tech‐
24       niques encodes 20-60 exposures using only  few  images,  the  displayed
25       exposures  may  not  be  identical  to  the exposures that are shown in
26       pfsview. For examples and more information, visit
27
28       http://pfstools.sourceforge.net/hdrhtml/.
29
30       <page_name> specifies the file name, of the web page to  be  generated.
31       If  <page_name> is missing, the file name of the first image with .html
32       extension will be used.
33
34       The command can take as input several images and put them  all  on  the
35       same web page. For each image, its file name (from the FILE_NAME tag in
36       the pfsstrem) without extension and a leading path will be  used  as  a
37       name  for  all JavaScript variables corresponding to that image. If the
38       filename contains illegal characters (such as space,  '-',  '[',  etc),
39       these will be converted to '_'.
40
41       --quality <1-5>, -q <1-5>
42              Quality of the interpolated exposures, from the worst (1) to the
43              best (5). The default is 2, which is sufficient for most  appli‐
44              cations.  Higher  quality will introduce less distortions in the
45              brightest and the darkest tones, but  will  also  generate  more
46              images.  More images means that there is more data that needs to
47              be transferred  to  the  web-browser,  making  HDR  viewer  less
48              responsive.
49
50       --image-dir <directory_name>, -d <directory_name>
51              Specify  where  to  store  the  resulting  image files. Links to
52              images in HTML will be updated accordingly. This must be a rela‐
53              tive path and the directory must exist.  Useful to avoid clutter
54              in the current directory.
55
56       --page-template <template_file>, -p <directory_name>,  --image-template
57       <template_file>, -i <template_file>
58              Replaces  the  template files used to generate an HTML web page.
59              The template files contain all HTML  and  JaveScript  code  with
60              special  keywords  (@keyword@) that are replaced with image spe‐
61              cific data, such as width, height, image  base  name,  etc.  The
62              default  template  files  can be found in INSTALL_DIR/share/pfs‐
63              tools/hdrhtml_default_templ/hdrhtml_*_templ.html.  There  is  an
64              alternative  template  bundled with pfstools in the hdrhtml_hdr‐
65              labs_templ directory, which contains many improvements and looks
66              much better but requires additional asset files.  The example at
67              the end of this manual shows how to  use  alternative  template.
68              More details on how to design own templates can be found in TEM‐
69              PLATE FILE FORMAT below.
70
71       --object-output <file_name.js>, -o <file_name.js>
72              Store JavaScript objects (hdr_<base_name>) associated with  each
73              image  in  a separate file. This is useful if you want to script
74              creating HTML pages.
75
76       --html-output <file_name.html>, -l <file_name.html>
77              Store HTML code that shows HDRHTML viewer for each  image  in  a
78              separate  file.  This  is  useful if you want to script creating
79              HTML pages.
80

TEMPLATE FILE FORMAT

82       pfsouthdrhtml  uses  two  template  files  hdrhtml_page_templ.html  and
83       hdrhtml_image_templ.html,  located  in  INSTALL_DIR/share/pfstools/, to
84       generate a web page with an HDR HTML viewer. The 'page'  file  contains
85       the HTML of the entire web page and the 'image' file is used to paste a
86       viewer code for a single image. You can replace one or both these  tem‐
87       plates   with  your  own  using  --page-template  and  --image-template
88       options.
89
90       Each template contains HTML code with additional keywords surrounded by
91       @  marks  (@keyword@),  which are replaced with HDR HTML specific code.
92       Most of the keywords are self  explanatory,  therefore  only  the  most
93       important are described below.
94
95       @hdr_img_def@ JavaScript objects that must be put in the 'body'
96              section  before  any  images.  These  define  all the parameters
97              needed to control HDR HTML viewer.
98
99       @cf_array_def@
100              Pre-computed array of opacity coefficients. The  same  array  is
101              used for all images that use the same quality setting. Currently
102              only one such array could be used per web-page, so images gener‐
103              ated  with different quality setting cannot be mixed on a single
104              web page.
105
106       @image_htmlcode@ or @image_htmlcode[base_name]@
107              Inserts HTML code of all images  or  a  single  image  with  the
108              base_name  (name  with no file extension) specified as a parame‐
109              ter. This should be put where HDR HTML viewer should be located.
110

EXAMPLES

112       pfsin memorial.hdr | pfshdrhtml memorial_church
113              Generates a web page memorial_church.html with a set  of  images
114              memorial_church_*.jpg in the current directory.
115
116       pfsin  ~/hdr_images/*.exr  |  pfssize  --maxx 512 --maxy 512 | pfsouth‐
117       drhtml hdr_images
118              Generate a web page with all OpenEXR images from  ~/hdr_images/.
119              The images are resized so that they are not larger than 512x512.
120
121       templ_dir=$INST_DIR/share/pfstools/hdrhtml_hdrlabs_templ/;        pfsin
122       img1.hdr   img2.exr   |   pfssize   -r   0.2   |    pfsouthdrhtml    -p
123       ${templ_dir}/hdrhtml_page_templ.html                                 -i
124       ${templ_dir}/hdrhtml_image_templ.html    test.html     &&     cp     -r
125       ${templ_dir}/hdrhtml_assets ./
126              The  commands  above  will  use  an  improved template from hdr‐
127              labs.com instead of the default one.  Note  that  this  template
128              requires html_assets directory to be copied manually to the des‐
129              tination directory. Replace $INST_DIR with the  directory  where
130              pfstools is installed (/usr/local by default).
131

SEE ALSO

133       pfsin(1) pfsout(1)
134

BUGS

136       Please   report   bugs   and   comments   to   the   discussion   group
137       http://groups.google.com/group/pfstools
138
139
140
141                                                              pfsouthdrhtml(1)
Impressum