BGPIC -- preload a background picture for later use (V2.0)
@BGPIC id, filename$[, table]
This preprocessor command preloads the background picture specified in filename$ and assigns the identifier id to it. If you specify 1 as the identifier, then this picture will be used as the initial background picture when Hollywood opens your display.

Image formats that are supported on all platforms are PNG, JPEG, BMP, IFF ILBM, GIF, and image formats you have a plugin for. Depending on the platform Hollywood is running on, more image formats might be supported. For example, on Amiga compatible systems Hollywood will be able to open all image formats you have datatypes for as well.

Starting with Hollywood 5.0, this function can also load vector formats like SVG if you have an appropriate plugin installed. Using a vector image as a BGPic has the advantage that when the size of the display changes (e.g. because the user is resizing the window), the BGPic can be adapted to the new size without any losses in quality because vector BGPics can be infinitely scaled without any sacrifices in quality. See Vector BGPics for more information on vector BGPics.

The third argument is optional. It is a table that can be used to set further options for the loading operation. The following fields of the table can be used:

This field can be used to specify a color in RGB notation that shall appear transparent in the BGPic.

Set this field to True if the alpha channel of the image shall be loaded, too. Please note that not all pictures have an alpha channel and that not all picture formats are capable of storing alpha channel information. It is suggested that you use the PNG format if you need alpha channel data. This tag defaults to False. (V4.5)

Set this field to False if you do not want to have this BGPic linked to your executable/applet when you compile your script. This field defaults to True which means that the BGPic is linked to your executable/applet when Hollywood is in compile mode.

See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

TextureX, TextureY:
See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

GradientStartColor, GradientEndColor:
See LoadBGPic for details. (V5.0)

GradientCenterX, GradientCenterY:
See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

See LoadBGPic for details. (V5.0)

ScaleWidth, ScaleHeight:
See LoadBGPic for details. (V5.3)

See LoadBGPic for details. (V5.3)

See LoadBGPic for details. (V6.0)

See LoadBGPic for details. (V6.0)

See LoadBGPic for details. (V6.0)

If you use Transparency, LoadTransparency or LoadAlpha, your display will automatically adopt the transparency settings of the BGPic when it is displayed. In other words, if you want to have a display with transparency, simply load a transparent BGPic and display it.

Please note that the Transparency, LoadTransparency and LoadAlpha tags are mutually exclusive. A BGPic can only have one transparency setting!

If you want to load background pictures manually, please use the LoadBGPic() command.

a value that is used to identify this background picture later in the code; if this is 1 then the picture will be the initial display background
the picture file you want to load
optional: a table for setting further options; see above for explanation
@BGPIC 1, "MyBG.png"
Declare "MyBG.png" as the initial background picture (will be displayed when Hollywood starts up).

@BGPIC 1, "MyBG.png", {Transparency = $FF0000}
Does the same like above but the picture is now transparent (transparency color is red=$FF0000).

@BGPIC 1, "4MB_uncompressed_picture.bmp", {Link = False}
The code above loads the specified picture and tells Hollywood that it should never link this image because it is so big.

Show TOC