Class: XFldObject
XFolder 0.85 introduced the possibility to display a user-defined bitmap during Desktop startup. With &xwp; 0.9.0, a new "Startup" page was introduced to the Desktop's settings notebook to allow for easy configuration of this feature.

The boot logo will remain visible until the WPS has completely initialized itself. It will then disappear and no longer consume any system resources.

The "Startup" page in the Desktop's settings notebook allows you to define the boot logo bitmap and style. More information can be obtained by pressing the "Help" button on that page.

I have included three boot logos with &xwp;:

When using your own bitmaps, mind these important notes:
  1. The boot logo must be an uncompressed OS/2 1.3 bitmap file. V2.0 bitmaps won't be loaded. I had to include my own bitmap loading code because at the time of Desktop startup, the WPS's multimedia classes don't work yet. You can use PMView or the WPS multimedia classes to convert existing files to 1.3 format.

  2. Transparency is calculated according to the most lower-left corner pixel of the bitmap. That is, all pixels which have the same color as pixel (0, 0) will be made transparent.

  3. You should be very careful in replacing these bitmaps. The transparency calculations are extremely CPU-intensive. If you use a 500x500 pixel bitmap with half of the pixels transparent, this can block your system for many minutes. And I mean block, because most of the calculating time is consumed by Presentation Manager (PM), and this will usually hang the whole system.

    If everything goes wrong and your WPS won't start any more, you can hold down the "Shift" key while the WPS is starting up. This will display the "Startup panic" dialog, where you can disable the boot logo and take care of the problem after the WPS is up.

    Since PM was designed to display rectangular windows only, the way these "shape" windows are done is that the bitmap is analyzed pixel by pixel and as many PM subwindows are created as rectangular non-transparent areas exist in the bitmap.

    For this reason, be very careful with transparency. The more non-rectangular transparent areas are in the bitmap, the more windows have to be created.

    Example:

             ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
             ³                    ³
             ³   11111111111111   ³
             ³   11111111111111   ³
             ³   2222      3333   ³
             ³   44444444444444   ³
             ³   44444444444444   ³
             ³                    ³
             ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
    (where " " is a transparent pixel) would result in the creation of exactly four subwindows (marked as "1"-"4").

    However, if you have "diagonal" or other non-rectangular transparency in your bitmap, one or several subwindows have to be created for each line of the bitmap, which can really make PM busy.

    Another example:

             ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
             ³                    ³
             ³   111111111        ³
             ³    2222  333       ³
             ³     44     55      ³
             ³      666 777777    ³
             ³       8888888888   ³
             ³        9999999999  ³
             ³                    ³
             ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
    This would already create nine windows: one for the top line, then two each for the following lines, and another one for each of the bottom lines. So imagine such an image with 500 lines: this would create at least 500 subwindows.

    To make this clear: it's not the parsing of the bitmap which uses a lot of CPU time. It's the creation of subwindows. So large bitmaps will not hurt if there's very little or only rectangular transparency.

    I found this out the hard way when I accidently dithered a bitmap to the system color palette. Suddenly, there were hundreds of transparent and non-transparent areas alternating (because the background which I intended was dithered).

    The bitmap had about 100 lines, and I got several 1000 windows. I pressed Ctrl-Alt-Del after about two minutes.

    So be warned. Start out with small bitmaps and see what your system can handle. For large bitmaps, try to make the transparent areas rectangular. Do not dither bitmaps, but use plain colors instead.