I'm not sure if this has been discussed before - a quick scan of the topics didn't turn up anything. Sorry if this is redundant.
Here's a short *nix shell script that converts a JPEG to JBP using the Netpbm tools:
#!/bin/sh
# jbcvt.sh - convert a jpg to a Juicebox compatible .jbp file
# .jbp files are 240x160 12-bit RGB raw data
jpegtopnm $1 | \
pnmscale -xsize 240 | \
pamcut -width 240 -height 160 -pad | \
tail -c 115200 > $1.rgb
./24to12.pl $1.rgb $1.jbp
Note that this script isn't smart enough to automatically rotate the image. It assumes that you've got it oriented the way you want and will scale & crop or pad to get it to the right dimensions.
More about Netpbm is here:
http://netpbm.sourceforge.net/
and the 24to12.pl script is here:
http://teched.net/~jacob/ce/juicebox/scripts/24to12.pl