Bringing Internet Technology Innovations to Market since 1991
  News Products Outsourcing About Us Contact Us
what's new?what's new? featuresfeatures samplessamples manualmanual downloaddownload buybuy
  Tonec Homepage
ProductsActive Imagesamples

Please view complete list of samples

Sample 5

Reading image from database

Reading image from database


Dim im, rs

Set im = CreateObject("ActiveImage.Images.1")
Set rs = CreateObject("adodb.recordset")
dsn = "tonec"
rs.Open "pictures", dsn, 2, 3
im.ReadFromDatabase rs.Fields("Bitmap")

im.WriteToFile "C:\readdb.png"
im.SetImageType 1
im.SetJpegQuality 100
im.WriteToFile "C:\readdb.jpg"
Set im = Nothing

 readdb.jpg readdb.png
 Picture 1. readdb.jpg (size - 29 Kb) Picture 2. readdb.png (size - 3 Kb)

Next sample >> 

If you have any questions or bug reports, write to for technical support.

  TonecPrivacy Policy
  1999-2005. Tonec, Inc. All rights reserved.