Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, July 7, 2005 12:11:04 AM(UTC)
quintesv

Groups: Registered
Posts: 2


Hi all,

I get the above error when loading tif images into the control. The error occurs randomly on client machines and I am sure it has to do with handle allocation within the control itself. Needless to say that when this error occurs, the .tif is not loaded and the image control becomes totally black.

Has anyone seen this error, or does anyone know if there is a fix, or how to get around this error?

Thanks in advance.

Quintes.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, July 10, 2005 11:33:04 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

This is ERROR_NO_BITMAP and it usually happens if your code does not check for errors. For example, when the load process fails and your code doesn’t check to see if it succeeded, and then the code tries to apply some sort of image processing on the image. Since the load failed, the function that expects a valid image has to return this error. If you are using the OCX, one way to check is to make sure LEAD1.Bitmap is not 0 before calling any function that needs a valid image.

I simulated a case by code. This could happen in your project if one of your users tries to open a 'bad' file, then a function is called without checking if LEAD1.Bitmap is non-zero.
10 LEAD1.EnableMethodErrors = False
20 Debug.Print LEAD1.Load("j:\images\OCR1.TIF", 1, 1, 1)
30 Debug.Print LEAD1.Bitmap
40 Debug.Print LEAD1.Load("c:\boot.ini", 1, 1, 1)
50 Debug.Print LEAD1.Bitmap
60 Debug.Print LEAD1.Flip

Output of line 20 is 0 because it's a valid image
Output of line 30 is 23464076 (it should be any non-zero value)
Output of line 40 is 20009 ERROR_FILE_FORMAT because the file exists but is not an image.
Output of line 50 is 0 because there's not bitmap now
Output of line 60 is 20002 ERROR_NO_BITMAP because there's no image now to Flip.

Maen Badwan
LEADTOOLS Technical Support

Edited by moderator Tuesday, March 28, 2017 7:54:12 AM(UTC)  | Reason: Not specified

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.049 seconds.