Good Day,
Part 1 of 2
Im superimposing 2 images(Overlaying images, with the 2nd image having a 50% opacity)
Now I have a rotation angle, a Row Offset & Column Offset Value.
When I rotate the 2nd image... it works
When a call the TRANSLATE function nothing happens!
Overlay Images Function:
primaryImage.load(imageFileName1);
secondaryImage.load(imageFileName2);
secondaryImage.invertPixels(); //Inverting Grayscale Image
QTransform rotating;
rotating.rotate(RotationAngle);
secondaryImage = secondaryImage.transformed(rotating); // Works
QTransform translating;
translating.translate(RowOffset, ColOffset);
secondaryImage = secondaryImage.transformed(translating); // Does not work
paintScreen = true;
update();
primaryImage.load(imageFileName1);
secondaryImage.load(imageFileName2);
secondaryImage.invertPixels(); //Inverting Grayscale Image
QTransform rotating;
rotating.rotate(RotationAngle);
secondaryImage = secondaryImage.transformed(rotating); // Works
QTransform translating;
translating.translate(RowOffset, ColOffset);
secondaryImage = secondaryImage.transformed(translating); // Does not work
paintScreen = true;
update();
To copy to clipboard, switch view to plain text mode

this is what I got:
//Paint Function
if(paintScreen = true){
//Repaint Primary Image
painter.
drawImage(QPoint(0,
0), primaryImage
);
painter.setOpacity(0.5);// drawn at n% opacity
painter.
drawImage(QPoint(0,
0), secondaryImage
);
}
//Paint Function
if(paintScreen = true){
//Repaint Primary Image
painter.drawImage(QPoint(0, 0), primaryImage);
painter.setOpacity(0.5);// drawn at n% opacity
painter.drawImage(QPoint(0, 0), secondaryImage); }
To copy to clipboard, switch view to plain text mode
Ideas Please
Solutions welcome
Part 2 of 2
Also Instead of inverting colors of 2nd image(grayscale)
Is there a way to convert the whole image into like a "Red Scale" or any other color of different shades
Solution
Kind Regards
Bookmarks