ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Are Image Processing Functions Reentrant?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Karl_H

USA
9 Posts

Posted - Mar 02 2012 :  13:36:45  Show Profile  Reply
Hi,
I have inherited some Delphi 5 code that uses ImageEn.

I am attempting to process images in parallel threads. In particular, I am trying to put the image enhancement functions used in prep for printing into a background thread. At the same time, the foreground thread may be called upon to capture new images.

My question is, are there any resources in ImageEn that I need to put mutexes on?

I am seeing random lost images coming through the background print queue processing. But there are no lost images when I process the capture and the print processing serially.

K

fab

1310 Posts

Posted - Mar 03 2012 :  14:57:07  Show Profile  Reply
Hi,
each TImageEnProc method should work on a single TIEBitmap (or TBitmap) object. You should provide locking mechanisms to avoid to process an image that the background thread is capturing.
Go to Top of Page

Karl_H

USA
9 Posts

Posted - Mar 05 2012 :  07:07:42  Show Profile  Reply
Many thanks.

I think I am already taking that precaution in the code -- although there could always be a hole somewhere my the mutex arrangement.

But I think it's more likely that something else is going on to cause the loss of data in the background thread (or more just as likely, in getting the data back to the foreground after it's processed so it can be printed). It could very well be a Windows XP issue (a Microsoft bug? -- who ever heard of such a thing )

I have perhaps two more days of project schedule I can burn on this issue, and I am also exploring other causes of lost data that are entirely outside of ImageEn. The actual point of data loss is elusive -- every instrumentation I've added to pin it down has come up with no conclusion.

Nevertheless, I sincerely appreciate the comments you posted.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: