Archive for July, 2006

Active Audio Record Update

Saturday, July 29th, 2006

We just updated Active Audio Record. The features added are:

1. Play the VOX file. You can use the play object to play the raw VOX file by specifying the sample rate and channels

2. Add an event and method to record object to help advanced users to grap the content of the raw PCM wave data from sound card.

3. Some bug fixes.

 

 

Scale image when converting tiff to pdf

Tuesday, July 25th, 2006

TIFF is a raster image. It has a DPI property to tell how long in inch the width or height of the image is.

When converting tiff to pdf, the default pdf DPI is 72, which means 72 pixels per inch.

So if you want to keep the pdf page size as large as the orignal TIFF image in inch, you can do it with the new method of the tiff to pdf component.

SetImageScaleRatio(LONG xScalePercent, LONG yScalePercent)
xScalePercent: the percent of PDF DPI ration (72) against the orignal image x DPI

yScalePercent: the percent of PDF DPI ration (72) against the orignal image y DPI 

For example, if you TIFF has DPI 200, the scale ration is 100*72/200. What you need to do is to call this method before converting.

After doing this, the pdf page can be in same inch to the tiff image. And the image quality doesn’t degrade as well. 

 

 

 

 

Generate html thumbnail directly

Saturday, July 22nd, 2006

You can generate thumbnail for a web page with html snapshot in several ways.

You can do in an easy way:

snap.SnapUrl(“www.google.com“, “1.jpg”)

snap.GetThumbnailImage(…)

 

A little complexer but more flexible way in case that you don’t need the big image

snap.SnapUrl “http://www.google.com“, “*”
 
‘Get the compressed image bytes out
‘it uses the extenstion to determine the file format
‘Get the thumbnail image bytes and save to file.
out = snap.GetThumbImageBytes(“*.jpg”, 100, 100, 1)
Set adoStream = CreateObject(“ADODB.Stream”)
adoStream.Type = 1
adoStream.Open
adoStream.Write out
adoStream.SaveToFile “1s.jpg”

html2image linux updated

Saturday, July 15th, 2006

We have added the functions:

 

1. Handle time out for some URL.

2. A web server wrapper around it so the html to image function can be called via http request at a speical port. Especially designed for php etc.

check it out

http://www.guangmingsoft.net/htmlsnapshot/html2image.htm