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.
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.
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.