title: Blending two different images in Qt
body: <p>My program generate 3 different images and I'd like to combine them using some opacity settings.</p>
  
  <p>First I have the raw image, which I already converted into a QPixmap to display it in a QGraphicsView.</p>
  
  <p><img src="https://i.imgur.com/R1AVP.jpg" alt="First Image">.</p>
  
  <p>Then with this image I make some calculation and generate a QImage because I need basic pixel access, I also add a legend.</p>
  
  <p><img src="https://i.imgur.com/2XxlF.png" alt="Second Image">.</p>
  
  <p>What I'd like to do is to be able to blend the two images while being able to modify the opacity.
  I don't have the tools to show an example, it should look like this:</p>
  
  <p><img src="https://i.imgur.com/CaDfz.png" alt="Third image"></p>
  
  <p>But with the first image and the data image blended with opacity. Also I'd like the legend to stay 100% visible. I can create a different QImage for the legend if it's needed.</p>
  
  <p>Also I know exactly which pixel should be considered transparent instead of white if it comes to that.</p>
  
  <p>In the future I would like to adjust the opacity just with a slider so I think it would be better if there was a solution that didn't involve calculating a whole new image every-time...</p>
  
  <p>Any lead would be appreciated...</p>