After a quick hack last week, I've taken a new approach to color
handling. The "problem" with xine's OSD support is that a color
palette with 256 entries has to be used, with #0 being transparent.
For drawing lines and boxes and rendering text this is amble colors.
For images, e.g., to show album cover or movie posters, it is a bit
limited. I have followed the idea of Java's BufferedImage, which uses
a color palette with 6 x 6 x 6 entries to encode RGB colors (total
216) and using the remainder for gray levels. In the current SVN
version, the 6x6x6 RGB cube is used from color index 30 until 245, and
246 to 255 contain 10 more gray levels. By this, there is a color
palette of 16 gray levels. The BuffereImage class is able to render
arbitrary images using the color palette. As the color palette is
fixed, it is also possible to show multiple images at the same time.
Now, I can imagine that the album cover might be faded in. For this,
the alpha value of the image color range (30-255) can be set with
With this scheme, the first 30 colors can be used for fonts and UI
drawing under the full control of your application, while at the same
time, thumbnails of images can be blended in. Note, all images have
the same alpha value, it is not possible to only fade a single one.
p.s. carlo bramix found a major bug in xine-lib for windows. I guess
some other quirks have to be dealt with, but, by this, a windows
version of libxine-java gets possible.