View Slides: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Activity migrated to sl.o |
|||
{{Translations}} |
|||
| download=http://activities.sugarlabs.org/en-US/sugar/addon/4039 |
|||
| git=http://git.sugarlabs.org/projects/viewslides |
|||
{{Olpcboxtop|toptext=[[{{PAGENAME}}|View Slides]]}} |
|||
| homepage=http://wiki.sugarlabs.org/go/Activities/View_Slides |
|||
{{ OBX activity |[[Image:Viewslides.svg]]||2=extra|Version 5 }} |
|||
| icon=[[Image:viewslides.svg]] |
|||
{{ OBX source|http://git.sugarlabs.org/projects/viewslides}} |
|||
}} |
|||
{{ OBX test |[[Tests/ViewSlides|ViewSlides]]}} |
|||
{{ OBX devtickets |view-slides}} |
|||
{{ OBX pootle|}} |
|||
{{ OBX team |James Simmons}} |
|||
{{ OBX mimetypes |application|zip }} |
|||
<small>see more [[:Category:OBX templates|templates]] or [[OBX proposals|propose new]]</small> |
|||
{{Olpcboxbottom}} |
|||
== Description & Goals== |
|||
{{Users}} |
|||
The View Slides activity is meant to allow the XO laptop to read view the contents of a Zip file containing images named sequentially. Project Gutenberg has a few books as raw scanned images, the Internet Archive has many more, and this can be a useful format for picture books, comic books, magazine articles, photo essays, etc. |
|||
The interface to View Slides is similar to the core Read activity, which should not be surprising as the toolbar code was adapted from Read's toolbar. You can use the up and down arrows or the game controller to move from page to page. |
|||
You can share documents just like the Read activity does. However, because sharing documents is slow and unreliable at this time this is not a practical way to distribute View Slides documents to a classroom. A much better solution is to set up a web server. |
|||
== Creating Slide Collections == |
|||
The image files in a collection can be JPEGs, GIFs, TIFFs, or PNGs. You can put them all in the root of the Zip file, or you can put them into subdirectories. The important thing is that the files and directories are named sequentially. |
|||
To make a file like this first create some image files and name them sequentially: |
|||
image001.jpg, image002.jpg, image003.jpg, ... |
|||
In Linux you can create the file with the zip command: |
|||
zip bookname *.jpg |
|||
will create a file named bookname.zip and put all the JPEGs in the current directory in it. I recommend using the suffix .zip for all of your files, especially if you plan to distribute them using a web server. The Apache web server uses the file suffix to determine the MIME type of the file. If you use a different suffix you may find that the Browse activity does not put the MIME type of the file in the Journal correctly and as a result the Journal entry won't have View Slides on its "Resume" menu. |
|||
When creating slide collections it is important to make the images close to the size in pixels of the screen resolution you plan to view them in. Digital camera pictures and scanned images are much larger than this, and the result is a huge waste of disk space and network bandwidth. Use a batch image conversion utility to reduce the size of your images. An excellent utility called '''mogrify''' is provided with the free [http://www.imagemagick.org/script/index.php Image Magick] software suite, available for Linux, Windows, and the Macintosh. |
|||
I recently used mogrify to convert a book from the [http://www.archive.org/index.php Internet Archive] for use with View Slides. The book was called [http://www.archive.org/details/storyofjackthegi00dalziala The Story of Jack and the Giants] and the page scans for that book were available in a zip file containing images in the JPEG2000 format. The images were far too large and View Slides does not support JPEG2000. I first unzipped the archive: |
|||
unzip storyofjackthegi00dalziala_jp2.zip |
|||
Next I changed to the directory containing the extracted files and ran '''mogrify''': |
|||
mogrify -scale 25% -format jpg -quality 80% *.jp2 |
|||
The utility cranked away for a few minutes creating .jpg files for each .jp2 file. I then used '''display''' to check the results, using the space bar to advance through the slides in sequence. |
|||
display *.jpg |
|||
These pages looked pretty good, so I erased the originals and created a new archive: |
|||
rm *.jp2 |
|||
zip JackAndTheGiants *.jpg |
|||
The original archive was about 40 megabytes, my new one was about 6 megabytes. You can download it [[media:JackAndTheGiants.zip|here]]. |
|||
Another file you can use to try out View Slides can be downloaded from [http://www.gutenberg.org/ebooks/21078 Project Gutenberg]. Look for the file format "Raw page images". |
|||
== Screenshots == |
|||
{|style="border: solid 1px gray; margin: 1em auto 1em; auto" |
|||
|- |
|||
| valign="top"| |
|||
[[Image:LaunchViewSlides.jpg|thumb|center|Launching the Activity from the Journal]] |
|||
| valign="top"| |
|||
[[Image:ScreenViewSlides.jpg|thumb|center|The View Slides Activity in action]] |
|||
| valign="top"| |
|||
[[Image:Screen2ViewSlides.jpg|thumb|center|The View Slides Activity, showing scanned text]] |
|||
|- |
|||
| valign="top"| |
|||
[[Image:VSScreenGrab1.jpg|thumb|center|Viewing a scanned book with the cursor hidden]] |
|||
| valign="top"| |
|||
[[Image:VSScreenGrab2.jpg|thumb|center|Showing the byte count when you receive a book someone shares with you.]] |
|||
|} |
|||
== Current Features == |
|||
* Currently you can load a zip file containing images and page through them in sequence like a book. The images will be resized to best fit in the current screen resolution without scrolling. If you change the screen orientation the image will be resized to fit the new orientation. |
|||
* You can share documents with other users, using code adapted from the core Read activity. For best results keep the size of your slides down by "mogrifying" them as described above. There is a text message on the "Read" toolbar showing how many bytes have been downloaded out of how many total. I plan to replace this message with a thermometer control eventually. |
|||
* Aggresive power management using code from Read activity. |
|||
* New with version 5 you can hide the mouse pointer (or make it visible again) by pressing the "square" button to the lower right of the XO screen (or numeric keypad "Home" on any other computer). This removes a source of distraction when viewing images. |
|||
== Planned Features == |
|||
* With the name "View Slides" it would be reasonable to expect a slideshow feature, possibly with fancy transitions. I may add another tab to the toolbox to provide this. |
|||
== Activity .xo file == |
|||
* [[media:ViewSlides-5.xo|ViewSlides.xo]] v.5 |
|||
{{Developers}} |
|||
== Bugs == |
|||
* When you exit the activity it should save the current page number and resume on that page number when you resume the activity. This actually works, but because of a known bug in Journal the page number meta data does not persist after a reboot. Also, the page number cannot be saved when the images are loaded from an SD card or USB drive. These devices don't have the same support for metadata as the Journal does. |
|||
* On some versions of the XO OS the Journal cannot deal with large files (15 mb or larger). This will prevent you from using larger files containing images. You can fix this by updating the OS, which currently requires getting a developer key. |
|||
* The document sharing code is not reliable. Currently it uses Tubes to copy a file from one computer to another. When using Gabble the file is Base 64 encoded and sent using a method that has a lot of overhead, which is necessary because the two computers might be on different networks and have to deal with with firewalls and the like. This is very slow but seems to work most of the time. When using Salut (mesh network) the computers are known to be on the same network, so copying can be much faster. Unfortunately, this method fails more often than not. The transfer simply dies shortly after it begins. |
|||
* Another bug with sharing documents is that when you resume a shared activity and the document is still being shared by others your copy of the activity will download the document again. There seems to be no way for the activity to know that it already has the document and does not need to get it again. This is because of the way methods in the activity are invoked. |
|||
== Source == |
|||
http://git.sugarlabs.org/projects/viewslides |
|||
[[Category:Software]] |
|||
[[Category:Developers]] |
|||
[[Category:Sugar]] |
Latest revision as of 15:55, 19 June 2009
?Sugar icon}} | This activity is now hosted at the Sugar Activity Library. The information here is likely to be out-of-date. Consult the new pages for "View Slides" first: |