Sample 5 - Reading image from database Reading image from database
> readdatabase.vbs
> Dim im, rs Set im = CreateObject("ActiveImage.Images.1") Set rs = CreateObject("adodb.recordset") dsn = "tonec" rs.Open "pictures", dsn, 2, 3 rs.MoveFirst im.ReadFromDatabase rs.Fields("Bitmap") rs.Close im.WriteToFile "C:\AI\readdb.png" im.SetImageType 1 im.SetJpegQuality 100 im.WriteToFile "C:\AI\readdb.jpg" im.DestroyImage Set im = Nothing
> Picture 1. readdb.jpg (size - 29 Kb) | Picture 2. readdb.png (size - 3 Kb)
If you have any questions or bug reports, write to active.image@tonec.com for technical support.