ASP Painter
Home
Home
Samples
Samples
Purchase
Purchase
Download
Download
Documentation
Documentation


ASPPainter::Stream::Stream.vbs

							
'============================================================
'Sample Stream.vbs
'============================================================

	' Define object variable
	Dim pic 
	' Create object
	Set pic = CreateObject("ASPPainter.Pictures.1")
	
	' Set background color in RGB format 	
	pic.SetBKColor 191,255,255,255
	' Create image with specified width and height 	
	pic.Create 150,75	
	
	pic.SetColor	0,0,0,255
	' Set foreground color in RGB format (black)

	'TrueType font
	pic.SetFontName "Verdana"
	pic.SetFontSize 14
	pic.SetFontBold 1	
	pic.SetFontAntialias 1
	pic.TextOut 10,40, "TrueType"
	' Save Image to file.
	pic.SaveToFile 	"C:\font.png" 	
'	Dim data
	data  = pic.SaveToStream
	pic.SetImageIndex 2
	pic.LoadStream(data)
	pic.SaveToFile "C:\stream.png"
'	msgbox UBound(data)
	' Delete image and free memory
	pic.DestroyALL	
	Set pic = Nothing 
	' Clear the variable


Picture 1. stream.png

More samples:

Stream

See also:

LoadStream, SaveToStream, SetBKColor , Create , SetFontName, SetFontSize, SetFontBold, SetFontAntialias, TextOut, , SaveToFile , DestroyALL



home samples purchase documentation download