10-24-2013 01:07 PM - edited 10-24-2013 01:08 PM
My question is very simple. If I run the program with the test images I have provided and do Image1-Image2. I do see it is not all ZERO'S , but when I want to save it to a file, I get a complete black image, why ?
Without saving to a file - Gives correct result.
With saving to a file - Gives INCORRECT result.
10-24-2013 01:41 PM
I tend to ignore code that over-uses stacked sequences and sequence locals, but if what you are describing is correct, something is not right the way you write to the PNG. Do you have the same problem when writing to another image format?
(Also, can you explain the reason for the inner while loop that seems to do file reading and the subtraction twice in a row. Once is probably sufficient. 🐵
10-24-2013 02:16 PM - edited 10-24-2013 02:18 PM
Yes this happens to any image format I choose. The while was reading it in and subtracting twice, removing the while fixed the issue. Thank you.
I too don't use stacked swquence codes, I usually go for event driven or producer/consumer architecture. This is for testing purpose only.