1c9d8fd0aSAndrzej BialeckiWarsaw, 1998.08.18
2c9d8fd0aSAndrzej Bialecki
3c9d8fd0aSAndrzej Bialecki			VIEW - small PNG viewer
4c9d8fd0aSAndrzej Bialecki			-----------------------
5c9d8fd0aSAndrzej Bialecki
6c9d8fd0aSAndrzej BialeckiThis program is intended to serve as a simple console viewer for PNG
7c9d8fd0aSAndrzej Bialeckigraphics. It also features some scripting abilities, which allow you to
8c9d8fd0aSAndrzej Bialeckibuild simple presentation.
9c9d8fd0aSAndrzej Bialecki
10c9d8fd0aSAndrzej BialeckiIn fact, using even this initial version I was able to build a nice
11c9d8fd0aSAndrzej Bialeckipresentation of PicoBSD abilities which I used in real-life situation (you
12c9d8fd0aSAndrzej Bialeckican see for yourself one of the presentation's screens, fbsd.png).
13c9d8fd0aSAndrzej Bialecki
14c9d8fd0aSAndrzej BialeckiThe audience was impressed :-), especially when I asked them politely what
15c9d8fd0aSAndrzej Bialeckiare requirements and cost to make that kind of presentation using M$
16c9d8fd0aSAndrzej Bialeckiproducts...
17c9d8fd0aSAndrzej Bialecki
18c9d8fd0aSAndrzej BialeckiSimple Viewing
19c9d8fd0aSAndrzej Bialecki--------------
20c9d8fd0aSAndrzej Bialecki
21c9d8fd0aSAndrzej BialeckiUsage is as follows:
22c9d8fd0aSAndrzej Bialecki
23c9d8fd0aSAndrzej Bialecki	view [-g nnn.nnn] [-r x] filename.png
24c9d8fd0aSAndrzej Bialecki
25c9d8fd0aSAndrzej Bialeckiwhere
26c9d8fd0aSAndrzej Bialecki	-g nnn.nnn	screen gamma (you can adjust how bright is the
27c9d8fd0aSAndrzej Bialecki			picture)
28c9d8fd0aSAndrzej Bialecki	-r x		resolution:
29c9d8fd0aSAndrzej Bialecki			0 - 640x480x16
30c9d8fd0aSAndrzej Bialecki			1 - 640x200x256
31c9d8fd0aSAndrzej Bialecki			2 - 320x240x256
32c9d8fd0aSAndrzej Bialecki
33c9d8fd0aSAndrzej BialeckiUnder right mouse button you can find a simple menu, which tells you also
34c9d8fd0aSAndrzej Bialeckithe hotkeys. You can shift, rotate and zoom the picture.
35c9d8fd0aSAndrzej Bialecki
36c9d8fd0aSAndrzej BialeckiPresentation
37c9d8fd0aSAndrzej Bialecki------------
38c9d8fd0aSAndrzej Bialecki
39c9d8fd0aSAndrzej BialeckiUsage is as above, but the file you give as argument is a (unix) text file
40c9d8fd0aSAndrzej Bialeckiof the following format:
41c9d8fd0aSAndrzej Bialecki
42c9d8fd0aSAndrzej Bialecki	1	VIEW SCRIPT
43c9d8fd0aSAndrzej Bialecki	2	5
44c9d8fd0aSAndrzej Bialecki	3	welcome.png
45c9d8fd0aSAndrzej Bialecki	4	/home/clipart/logo.png
46c9d8fd0aSAndrzej Bialecki	5	/home/present/title.png
47c9d8fd0aSAndrzej Bialecki	6	/home/present/outline.png
48c9d8fd0aSAndrzej Bialecki	7	/home/present/end.png
49c9d8fd0aSAndrzej Bialecki
50c9d8fd0aSAndrzej Bialecki(of course without the line numbering or the leading space!). The line number
51c9d8fd0aSAndrzej Bialecki1 is magic, and must be present in order to recognize the file properly.
52c9d8fd0aSAndrzej Bialecki
53c9d8fd0aSAndrzej BialeckiThe second line tells how many pictures consist the presentation. The
54c9d8fd0aSAndrzej Bialeckifollowing lines tell the file names containing the images themselves.
55c9d8fd0aSAndrzej Bialecki
56c9d8fd0aSAndrzej BialeckiSee the example in file picobsd.vu.
57c9d8fd0aSAndrzej Bialecki
58c9d8fd0aSAndrzej BialeckiCommand line arguments (gamma and resolution) are as above. You can also use
59c9d8fd0aSAndrzej Bialeckithe pop-up menu to adjust image parameters, as well as go forward or
60c9d8fd0aSAndrzej Bialeckibackward in the presentation.
61c9d8fd0aSAndrzej Bialecki
62c9d8fd0aSAndrzej BialeckiBugs, caveats, missing features
63c9d8fd0aSAndrzej Bialecki-------------------------------
64c9d8fd0aSAndrzej Bialecki
65c9d8fd0aSAndrzej Bialecki* there are some bugs in libvgl which require strange workarounds, and even
66c9d8fd0aSAndrzej Bialecki  then it doesn't work quite right. See the source for the 'XXX' comments...
67c9d8fd0aSAndrzej Bialecki
68c9d8fd0aSAndrzej Bialecki* I didn't have time to add gamma adjustment to the pop-up menu. It's
69c9d8fd0aSAndrzej Bialecki  simple, though, and I leave it as an exercise for the reader :-))
70c9d8fd0aSAndrzej Bialecki
71c9d8fd0aSAndrzej Bialecki* it would be great if someone would add GIF and jpeg support.
72c9d8fd0aSAndrzej Bialecki
73c9d8fd0aSAndrzej Bialecki* the error checking is probably weak. A bad PNG file or script file will
74c9d8fd0aSAndrzej Bialecki  probably cause a coredump.
75c9d8fd0aSAndrzej Bialecki
76c9d8fd0aSAndrzej Bialecki* pop-up menu facilities need more abstraction to be usable in other cases.
77c9d8fd0aSAndrzej Bialecki
78c9d8fd0aSAndrzej BialeckiAnyway, as it is even now it's quite usable.
79c9d8fd0aSAndrzej Bialecki
80c9d8fd0aSAndrzej BialeckiHave fun!
81c9d8fd0aSAndrzej Bialecki
82c9d8fd0aSAndrzej BialeckiAndrzej Bialecki
83c9d8fd0aSAndrzej Bialecki
84e0b7bc57SAndrzej Bialecki<[email protected]>
85c9d8fd0aSAndrzej Bialecki
86*97d92980SPeter Wemm$FreeBSD$
87