JPEG Scripture Publishing for Simple Phones

Why make Scripture JPEGs?

There are a range of low-cost phones that don't run Android or iOS, etc. or even Java. However, they do have a camera, and hence they have a way of displaying photo/JPEG files. They also have a SD card slot, and 2GB SD cards are cheaply available.

The Bible Drop Box accepts zipped USFM files (the easiest way is a Paratext backup to file) and can convert them to a PhotoBible. This is a collection of hundreds of JPEG files, each containing 2-3 verses, organised in folders by book and chapter for the phone user to navigate through. After opening one of the images, the left and right navigation buttons on the phone will turn the pages in order.

Unfortunately this was all developed without having access to a phone, so it's depended on others to describe how the phones work. The JPEG files are each 320x240 pixels with a one pixel left-hand margin. The right-hand side of the top line, and the bottom line of the screen/JPEG are used by the phone to display filename and other information, so those areas are left blank in the JPEG files. (It's likely that different phones will work better with different size JPEGs, but we have no information about that yet, and there's no provision for specifying it at this stage.)

Here is sample data from Matthew 1 in a Philippine language. Click on the first image and use the arrows to page through in actual size.

05 07 12 00 02 13 11 06 01 09 03 04 10 08

Preparing your USFM files

If your USFM files contain TOC3 lines, the folder names will use those book abbreviations for the folder names. If they contain TOC1 or TOC2 or h lines, the vernacular name of the book (and the chapter number) will be displayed at the top of each page.

How it works

All of the folders and files (apart from the initial OT and NT folders) are numbered (with leading zeroes like 001) in order to sort correctly on the phone. They are also created in the logical order, so the time stamps on the files should also be in a logical order.

As of writing there is still something we don't understand about the sorting of the JPEGs on the phone, and by default they are not sorted in the correct order. There is an extra manual step required to correct this. We believe we could solve this problem if you have a phone and could help us to do some testing on the phone's sorting algorithms. (It might sort by filename, filedate, or even by internal JPEG information fields which we don't currently fill.)

The output is packaged as a zip file for downloading and installing on the SD card. The whole Bible is around 500MB (make sure you use a download manager for downloading this) -- the OT is also zipped separately (around 350MB) and the NT also (around 150MB).

Hopefully most of the instructions on the Bible Drop Box submission page are clear.

Be sure to check the PhotoBible export box because it's not enabled by default. 

You will receive an automatic response email after your files have been processed and it will contain the link to a private web page. About half-way down that page, you should find the link to the created PhotoBible files.


I would suggest that you think of this PhotoBible output like a printed Bible -- you wouldn't distribute it widely until you'd proof-read it to check for typesetting errors. As of this writing, it's been checked for one project, but as mentioned above, without access to a phone myself, I can't make many guarantees. The export engine is a very simple typesetting system, and occasionally a line goes very close to the right margin (and possibly a letter is lost from time to time, although I haven't found any yet).

PhotoBible only works for left-to-right languages. It hasn't been tested on non-Roman fonts yet.

It would be nice to have the verse numbers done in a smaller font, or even a different colour, but unfortunately the current software system doesn't allow this. (I tried and failed. For those who want technical information, the Bible Drop Box is all written in Python3, it runs on Ubuntu Linux, and the PhotoBible export runs the  Imagemagick convert command-line program to do the export. It was developed quickly as a proof-of-concept for a PNG language -- perhaps we might find a better way to do it in the future especially if there's any Linux gurus reading this.)

If you have any questions or comments about the PhotoBible or the Bible Drop Box, feel free to email me at Freely dot Given dot org at gmail dot com.

-- Robert Hunt



Creative Commons License
All content on this LingTranSoft wiki are by SIL International are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.