WebPalette

The WebPalette function rebuilds the image according to "orthogonal" palette being used by Web browsers.

WebPalette

Remarks

Use this function to make your image fully compatible with Web browsers palette and to put anti-alias effect to your image. This function sufficiently faster than BuildPalette, so it's recommended use it instead.
Use this function just before calling GifImage function to improve your image quality, if you used some operations which can require additional colors in the palette, like drawing text with font, different from the one with default height.

See too

CreateImage, SetColor
Example

<%@ Language=VBScript %>
<%
Response.ContentType="image/gif"
set obj=Server.CreateObject("shotgraph.image")
size=100
obj.CreateImage size,size,256
obj.SetColor 0,255,255,255
obj.SetColor 1,0,0,0
obj.SetColor 2,255,108,0
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1

obj.SetTextAlign "TA_CENTER","TA_BASELINE"
obj.SetBkColor 0
obj.SetTextColor 1
obj.CreateFont "Arial",0,22,0,True,False,False,False
obj.TextOut size/2,24,"Text1"
obj.SetTextColor 2
obj.CreateFont "Arial",0,15,0,True,False,False,False
obj.TextOut size/2,size/2,"Text2"

obj.WebPalette

img=obj.GifImage(-1,1,"")
Response.BinaryWrite(img)
%>
Results:
Without BuildPalette With BuildPalette