|
|
 |
 |
| SetHTMLDocImageBGColor |
| |
Set HTML image background color |
| |
| Library |
 |
wh::formatter/html.whlib |
| |
| Syntax |
 |
PUBLIC MACRO SetHTMLDocImageBGColor (INTEGER htmldocid,INTEGER bgcolor) |
| |
| Description |
 |
SetHTMLImageBGColor tries to set the background colour of all images to value bgcolor. When converting images embedded in a Word document, WebHare analyses the images and creates a PNG or JPEG image based on the number of colors, and possible transparency in the image. If a transparent image is embedded, a transparent PNG image will be created by default. You can use the SetImageBgColor function to override this default behaviour, for example if your site design requires the use of a single background color for all images.
There is no guarantee all images converted from the Word document will have the specified background colour. This depends largely on the type of image inserted in the document, and how Word internally converts the image.
Starting with WebHare AP v2.30, and for all versions of WebHare Lite, this function sets the default background colour for a page. This background color is also used during Word conversions to set the proper font color for text marked as 'automatic', and it is interpreted as the 'default' color for images (it will not override the background color of images inside table cells). This change should be transparent to most users and improves image quality by reducing the need for transparent pixels. |
| |
| Parameters |
 |
| htmldocid |
 |
ID of the HTML document |
 |
| bgcolor |
 |
The colour override (use GfxCreateColor(255,255,255,0,0) for a transparent (white) background) |
 |
|
| |
| Example |
 |
// Set the background color to bright red
SetImageBGColor(GfxCreateColor(255,0,0,0)); | |
|
|
|
|