short note on GetBitmapHandle

grass In our Html Snapshot, there is a method GetBitmapHandle, which is to return an in-memory bitmap after a successful SnapUrl call. This method is useful when user wants to add some post processing to the image converted from html. For example, you may want to add your customer watermark text or image onto the html image or you want to clip out selected region of the image.

Here is the definition of the method.

HBITMAP GetBitmapHandle().

You can see the return value of it is a windows bitmap handle. Experienced programmers would ask a question: who will release the handle? Yes, the design here is that the caller MUST release the handle with a Win32 API call DeleteObject. If not, the handle will be leaked,whichwill lead to out of memory problem if there are lots of repeated call.

If you are using .Net programming languages such as C# or VB.Net, you have to use the interop service provided by .Net platform. The DeleteObject API can be imported into C# as follows.

        [DllImport("gdi32.dll")]
        public static extern bool DeleteObject(
            IntPtr handle
            );

Then it can be used just like a normal C# static method. There is a working demo in DemoC#GetAPage in the trial package of html snapshot.

 

Html Snapshot 2.1.2006.111 released

Dear customers:  

This is the first release of the 2006. We are still committed to improve Html snapshot in this year to provide you the best “html to image” converter component.

Here are some changes:

1. Update the C# demo showing how to use the GetBitmapHandle and DeleteObject.

 

2. Provide a signed .Net assembly Htmlsnap2Net.dll, which can be added into to global assembly cache.

3. Add support to meta refresh tag.

Following is the VB Demo. It shows converting MSN.com into jpg files.

get a page

Spam emails

About half of my emails every day are now spams. It seems I need a spam filter now. But I am a little bit afraid that if a customer’s email is wronly classified as spam. That might be a big problem. So I am still filtering spam manually at present.

Active Audio Record New Release

Hi, Dear customers:

I am happy to anounce that we have just released a new version of Audio Record Component.

Check it out from this page:

http://www.guangmingsoft.net/audiorecord/

There are two features added:

1. Add DeviceLineType property and GetDefaultDeviceName method. 
Some users want to detect the microphone source line automatically. The DeviceLineType property can tell if a line is a microphone, line-in or wave out.  Hope you guys will be happy with this feature.
                      


2. Add WMA lossless and speech codec support (the format name has “lossless” or “speech”). Note this is not a new file format but the wave format of the WMA file option. You can enumerate the wave format names when file format is WMA. The last several codes are the newly added, which has the ending of “loseless” or “speech”. 
The cool thing about the speech codec is that it can generate really small audio files for voice only scenerios.  (as low as 4kbps, but the quality of it is still good, I think :) )

 Here is a snap shot of the VB demo in the Active Audio Record trial package.

aar codec

Cool, word press 2.0

I just upgraded word press to the new 2.0.  The upgrading process is without pain.

The new post interface is WYSIWYG now.

Image uploading is really easy now.  Here is a sample.

image

Good job, word press team! You are professional guys every developer should learn from.

Go to get word press install now.

Oops

It is a long time without new post here. I even forgot the password. :)
It seems that I am not a diligent blogger.

WordPress is releasing version 2 now. I am looking into it. Hopefully I can upgrate to it soon.

Forum is hacked by some bad guys

Our forum is hacked by some bad guys.
I am working to restore it.

Recently update:
I have decided not to open the forum since I haven’t found a more secure bulitin board program.
Recently a phpBB forum I often visit is also hacked by some one.

For customers, you can send email to support@guangmingsoft.net for quick help. We will response in 24 hours normally. Of course, you can also put some comments here. I would like to see more comments so I will be more encouraged to blog! :)