
	This is a small program I have obtained that compares two bitmaps. 
BMPDiff was insired by the ICOMPARE (Image-Compare) program and 
contains much of its original code. It was discussed in a german 
computer magazune "C'T" in 1999. The code is not very well documented 
and partly in german, contact me if you have any questions and I will 
contact the author who ported it to OS/2.  The original source code for 
bmpdiff.exe is included, as well as the original code from the article 
(icompare.c) in the <source> directory. This is posted with the 
permission of Mr. Jurgen Dittmer...the author of the ported version.

Usage: BMPDiff -1:Image1 -2:Image2 -d:Diff -b:15 > NUL

	where Image1 = image1.bmp, Image2 = image2.bmp

	& -b:'least sensitive' 3 5 7 9 11 13 15 'most sensitive'

Known Problems:

	There is a small memory leak.

	To demonstrate this, first run mem.exe which will give you a 
indication of running memory totals.  While leaving mem.exe running, 
open an os/2 window and run test.cmd.  Bmpdiff will give the same 'rc' 
each time a comparison is made...however after 7 or 8 shots...some 
bytes seem to disappear from memory, as registered through mem.exe. 
Theseus also reports memory leaked and lost after running this cmd file 
for a time. (Use <Ctrl>C to stop)

	Other Symptoms while running inside my Visual Rexx app....	

1) when I use the REXX 'signal on error' inside my Visual Rexx program 
is errs as soon as bmpdiff.exe is run

2) with the REXX 'signal on error' remmed out the program runs, but 
leaks and locks up about 12000 bytes every 7th or 8th comparison but 
does not crash.  I am taking 'snap shots' (bitmap images from video 
source) and comparing about one every 3 seconds...the time between my 
shots can over 12 hours increase to 6 seconds between shots; as well as 
all my other programs become very jerky in operation...hesitations all 
over the place..

3) I can stop bmpdiff.exe by running certain functions from PMMail, 
Netscape, Star Office, PMView or any programs that require a lot of 
resources.  My REXX thread does not crash...bmpdiff.exe just stops 
running.

4) the only way I have found to reclaim the lost memory is by rebooting

 The author of the port suggested that:

1) the OS/2 Multimedia API may be the problem					 
2) that he may not have cleaned up memory with the correct API calls

and he also suggested that it may be better not to use MMOS2 API's and 
to write my own bitmap handling routines (I am not quite to sure what 
this would mean)..

	Mem.exe is one of the component programs found in Warp10.zip, a 
freeware program.  I have included warp10.txt in the source directory.  

	I would appreciate any help to help find and solve this problem.	

Chuck - rwc1717@shaw.ca







