Overlaying two images

DaLa: <p>I try to overlay two images but the result is not what I want.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/7/1792b9e0ae2d72e3691e7b2f79b7e51a2d9190c7.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/1792b9e0ae2d72e3691e7b2f79b7e51a2d9190c7" title="ISIC_0024327"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/7/1792b9e0ae2d72e3691e7b2f79b7e51a2d9190c7_2_500x500.jpeg" alt="ISIC_0024327" data-base62-sha1="3mxl8PsHiOw4t0askDTTqjpafI3" width="500" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/7/1792b9e0ae2d72e3691e7b2f79b7e51a2d9190c7_2_500x500.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/1/7/1792b9e0ae2d72e3691e7b2f79b7e51a2d9190c7_2_750x750.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/1/7/1792b9e0ae2d72e3691e7b2f79b7e51a2d9190c7.jpeg 2x" data-dominant-color="C6787C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">ISIC_0024327</span><span class="informations">768×768 32.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/a/2a97c4287a9c83506076d4538a5a58c6a0164fe8.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/2a97c4287a9c83506076d4538a5a58c6a0164fe8" title="ISIC_0024327"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a97c4287a9c83506076d4538a5a58c6a0164fe8_2_500x500.jpeg" alt="ISIC_0024327" data-base62-sha1="64Nd6KG0ujBkcrfsmE47Pg6cV3a" width="500" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a97c4287a9c83506076d4538a5a58c6a0164fe8_2_500x500.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a97c4287a9c83506076d4538a5a58c6a0164fe8_2_750x750.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/2/a/2a97c4287a9c83506076d4538a5a58c6a0164fe8.jpeg 2x" data-dominant-color="0A0608"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">ISIC_0024327</span><span class="informations">768×768 34.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/5/25f23ad78cfeb209e56f4c4e1b36f6cbd0e1d760.jpeg" data-download-href="https://discuss.pytorch.org/uploads/default/25f23ad78cfeb209e56f4c4e1b36f6cbd0e1d760" title="ISIC_0024327"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25f23ad78cfeb209e56f4c4e1b36f6cbd0e1d760_2_500x500.jpeg" alt="ISIC_0024327" data-base62-sha1="5pGDLOh8xocqzpY9RRNjekgqZIk" width="500" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25f23ad78cfeb209e56f4c4e1b36f6cbd0e1d760_2_500x500.jpeg, https://discuss.pytorch.org/uploads/default/optimized/3X/2/5/25f23ad78cfeb209e56f4c4e1b36f6cbd0e1d760_2_750x750.jpeg 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/2/5/25f23ad78cfeb209e56f4c4e1b36f6cbd0e1d760.jpeg 2x" data-dominant-color="BD7275"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">ISIC_0024327</span><span class="informations">768×768 52.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I get this image where the color of hair is white:<br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/3/a/3afc719a921aef0eea6e625c901592443ce8ad53.jpeg" alt="ghg" data-base62-sha1="8pOycbExpBTRzIrKaIeH9vU3Sdd" width="256" height="256"><br>
Here iis the code"</p>
<pre><code class="lang-auto">from PIL import Image, ImageChops

# Load the images
image1 = Image.open('C:/Users/asus/Desktop/Testing/hairoccluded/ISIC_0024327.jpg')
image2 = Image.open('C:/Users/asus/Desktop/Testing/hairfree/ISIC_0024327.jpg')

# Subtract image2 from image1
subtracted_image = ImageChops.subtract(image2, image1)

# Reverse the subtraction using ImageChops.add
reversed_image = ImageChops.add(image2, subtracted_image)

# Display the reversed image
reversed_image.show(
</code></pre>