From: B.S on
> Hi BS,
>
> When it fails, your bitmap is NULL. If you check the "bi.bmHeight" ,
> it has some invalid large ints.
>
> Thats the reason I asked you to add a check in my earlier reply.
>
> HTH
> -Seetharam

Thanks, i will fix that now.