Hi all,
I am facing a problem while drawing a transformed image on a component.I am working with juce version 1.45. I am using drawImageTransformed() method to draw the image. It is drawing the image for the given AffineTransform, but a black patch is comming around the Image(Screen shot is attached).This happens only with JPEG images. If I load PNG images, its working fine. The problem happens only when I apply a rotation.Am I doing something wrong?
I am loading the image in the constructor…
My painting code is as follows:
void paint (Graphics& g)
{
g.fillAll (Colours::white);
juce::AffineTransform transForm = juce::AffineTransform::identity;
transForm = transForm.rotated(-0.25)
.translated(100, 200);
g.setOpacity(1.0f);
g.drawImageTransformed(myImage, 0, 0, myImage->getWidth(), myImage->getHeight(), transForm, false);
}
Thanks in Advance,
Moka.