138589SabialWarsaw, 1998.08.18 238589Sabial 338589Sabial VIEW - small PNG viewer 438589Sabial ----------------------- 538589Sabial 638589SabialThis program is intended to serve as a simple console viewer for PNG 738589Sabialgraphics. It also features some scripting abilities, which allow you to 838589Sabialbuild simple presentation. 938589Sabial 1038589SabialIn fact, using even this initial version I was able to build a nice 1138589Sabialpresentation of PicoBSD abilities which I used in real-life situation (you 1238589Sabialcan see for yourself one of the presentation's screens, fbsd.png). 1338589Sabial 1438589SabialThe audience was impressed :-), especially when I asked them politely what 1538589Sabialare requirements and cost to make that kind of presentation using M$ 1638589Sabialproducts... 1738589Sabial 1838589SabialSimple Viewing 1938589Sabial-------------- 2038589Sabial 2138589SabialUsage is as follows: 2238589Sabial 2338589Sabial view [-g nnn.nnn] [-r x] filename.png 2438589Sabial 2538589Sabialwhere 2638589Sabial -g nnn.nnn screen gamma (you can adjust how bright is the 2738589Sabial picture) 2838589Sabial -r x resolution: 2938589Sabial 0 - 640x480x16 3038589Sabial 1 - 640x200x256 3138589Sabial 2 - 320x240x256 3238589Sabial 3338589SabialUnder right mouse button you can find a simple menu, which tells you also 3438589Sabialthe hotkeys. You can shift, rotate and zoom the picture. 3538589Sabial 3638589SabialPresentation 3738589Sabial------------ 3838589Sabial 3938589SabialUsage is as above, but the file you give as argument is a (unix) text file 4038589Sabialof the following format: 4138589Sabial 4238589Sabial 1 VIEW SCRIPT 4338589Sabial 2 5 4438589Sabial 3 welcome.png 4538589Sabial 4 /home/clipart/logo.png 4638589Sabial 5 /home/present/title.png 4738589Sabial 6 /home/present/outline.png 4838589Sabial 7 /home/present/end.png 4938589Sabial 5038589Sabial(of course without the line numbering or the leading space!). The line number 5138589Sabial1 is magic, and must be present in order to recognize the file properly. 5238589Sabial 5338589SabialThe second line tells how many pictures consist the presentation. The 5438589Sabialfollowing lines tell the file names containing the images themselves. 5538589Sabial 5638589SabialSee the example in file picobsd.vu. 5738589Sabial 5838589SabialCommand line arguments (gamma and resolution) are as above. You can also use 5938589Sabialthe pop-up menu to adjust image parameters, as well as go forward or 6038589Sabialbackward in the presentation. 6138589Sabial 6238589SabialBugs, caveats, missing features 6338589Sabial------------------------------- 6438589Sabial 6538589Sabial* there are some bugs in libvgl which require strange workarounds, and even 6638589Sabial then it doesn't work quite right. See the source for the 'XXX' comments... 6738589Sabial 6838589Sabial* I didn't have time to add gamma adjustment to the pop-up menu. It's 6938589Sabial simple, though, and I leave it as an exercise for the reader :-)) 7038589Sabial 7138589Sabial* it would be great if someone would add GIF and jpeg support. 7238589Sabial 7338589Sabial* the error checking is probably weak. A bad PNG file or script file will 7438589Sabial probably cause a coredump. 7538589Sabial 7638589Sabial* pop-up menu facilities need more abstraction to be usable in other cases. 7738589Sabial 7838589SabialAnyway, as it is even now it's quite usable. 7938589Sabial 8038589SabialHave fun! 8138589Sabial 8238589SabialAndrzej Bialecki 8338589Sabial 8440813Sabial<abial@freebsd.org> 8538589Sabial 8650479Speter$FreeBSD$ 87