Drawing on the OSD
It would make much more sense to use an alternate firmware to do real custom OSD work, but if you just want to display some stuff in an overlay fashion you can do it a couple of ways:
1) Draw an image pixel by pixel on the screen using the drawRect test option
2) Upload an image via USB and use the image blit tests to show it.
To do all of this, you have to have enabled the RS232 debug mode from the service menu. If you type debug <enter> d and then see a whole lot of options listed, you have debug mode available. I found that if you dabble in option 14, the OSD test menu, you can draw rectangles (whoo!), test patterns, and blit images directly. A few things I found:
OSD Layer 0 is used by the TV for its OSDs. If you disable it, you won't be able to see the volume indicator, menu, etc -- might be useful? It uses an ARGB color space, of the format AARRGGBB where each of these is a hexidecimal value.
OSD Layer 0 has the dimensions of 1366x768 -- don't go beyond those or odd things happen (or nothing happens sometimes)
OSD Layer 1 doesn't seem to be available. I can't seem to change its size or enable it.
OSD Layer 2 is slightly more persistent, but it can get cleared if you change channels or have closed captioning enabled (actually, I think closed captioning IS on layer 2) This mode and others also use an indexed color space, and you can draw the palette to the screen also from the debug menu.
The menu options that have -----'s in them will most certainly crash the TV (no joke!) if you try them.
Anything you do in this menu will be undone if you turn off the tv and turn it back on.
The image blit tests work well with JPGs, but I haven't had luck with transparent PNGs (that would be the bee's knees if it worked with transparent images!)
To reproduce the image I created, paste the contents of "jolly.txt" into the terminal window -- and be patient. It's not very fast. You could probably speed it up if you crank the serial port of the TV to 115200 from the same menu you used to put it in "event" or "debug" mode to begin with.
Advanced OSD display over serial:
Using the lrz utility (see "sending binaries" section) on a USB stick, I have a shell script that does the following:
1) Resize image to target size (the smaller the image, the faster it transfers)
2) Transfer image to /tmp folder of TV
3) Use debug menu to blit image to the lower-right corner of the TV.
Some improvements are needed, but here's something that kind of works:
#!/bin/bash
port=/dev/ttyUSB1
stty -F $port ispeed 115200 ospeed 115200 -echo
image=/tmp/a.jpg
targetWidth=100
targetHeight=100
#imagefile=${image##*/}
#info=$(convert $image info:)
#width=$(echo $info | awk '{split($3,size,"x");printf size[1];}')
#height=$(echo $info | awk '{split($3,size,"x");printf size[2];}')
#since we're resizing it doesn't matter what the original dimensions were
width=$targetWidth
height=$targetHeight
convert $1 -resize "$targetWidth"x"$targetHeight" -quality 90 $image
echo >> $port
echo exit >> $port
echo x >> $port
echo >> $port
echo debug >> $port
echo dsh >> $port
sleep 0.5s
#cat > /dev/null << EOL
cat >> $port << EOL
cd /tmp
cp /mnt/usb1/Drive1/lrz.gz .
gunzip lrz.gz
rm a.jpg
EOL
#sleep 1s
sleep 0.2s
echo ./lrz >> $port
sleep 0.2s
sz -b -L 512 $image < $port > $port
sleep 0.5s
#cat >/dev/null << EOL
cat > $port << EOL
exit
EOL
sleep 0.25s
cat > $port << EOL
14
14
0
0
0
1366
768
00000000
0
1e
2
/tmp/a.jpg
$width
$height
1265
667
$targetWidth
$targetHeight
0
0
ff
exit
x
EOL
To use this script, just call the script and pass it the name of the image. You may want to adjust the script to resize the image to something slightly larger (adjust width and height variables to match) as the result turns a little fuzzy. Alternatively you can dabble in image majick's convert options to apply some sharpening to the image. If you're working with fixed sizes, you may just want to omit the convert part altogether, but use the commented-out section to read the width and height to avoid any accidents.