This site requires JavaScript, please enable it in your browser!
Greenfoot back
Morran
Morran wrote ...

2011/12/2

getImage().mirrorHorizontally() tints red

Morran Morran

2011/12/2

#
For some reason, when I call getImage().mirrorHorizontally() on certain objects, they get tinted red. Not the whole image, but mainly the middle shades. This can look kind of weird, and really distracts. After mirroring the image, subsequent calls to getImage().mirrorHorizontally() keep the same red tint. After changing the image to something else(calling "setImage(String newImage)"), the red tint is gone. Does anyone know what is happening? I uploaded a scenario "PicturesForGreenfootProblem," because I noticed the problem on there.
nccb nccb

2011/12/2

#
I've had a play but I don't see the same problem on my machine. Can you let us know which Greenfoot version and OS version you are running on?
Morran Morran

2011/12/2

#
I think that it's Greenfoot version 2.1.2. I'm running on a Windows XP. Did you download the scenario and mirror the pictures, or did you just run it on the Greenfoot website? The website version doesn't mirror the (non-Alice)pictures. Maybe I should export it where it does mirror the pictures.
Morran Morran

2011/12/2

#
Okay. I just exported the version that mirrors the (non-Alice) pictures. When I run it on the Greenfoot website, I still get tinted pictures.
nccb nccb

2011/12/5

#
I didn't get the problem on my Ubuntu machine (I opened it in Greenfoot and mirrored the images), but today I finally had chance to try it on an XP machine. Doing the same thing, I get exactly the problem that you describe. We'll investigate.
nccb nccb

2011/12/5

#
I've tried it on an older version of Greenfoot and got the same problem, but when I tried JDK 6 (rather than 7), the problem went away. So it looks likely to be a bug in JDK 7. Looking at our Greenfoot code, I'm not sure if we will be able to work around the bug, so it may be a case of waiting for the JDK 7 fix that sorts out the bug, or downgrading to JDK 6 to avoid it.
Morran Morran

2011/12/5

#
Okay thanks! My computer got a virus a while back, and I had to sweep out the JDK. The mirrorHorizontally() worked back then, but after I reinstalled Greenfoot and the JDK, when I call mirrorHorizontally(), it tints red. I think it's because I downloaded JDK 7. I'll switch back to JDK 6. Thanks, for a moment there I thought I was the only one who saw the problem.
mjrb4 mjrb4

2011/12/5

#
The other alternative (though admittedly less convenient) is to upgrade from XP - on Windows 7 I don't see the aforementioned behaviour at all.
Morran Morran

2011/12/5

#
Thanks, I'll keep that in mind.
jagrosh jagrosh

2013/5/30

#
I'm having this problem as well, and I've found it only causes the tinting effect when run withing the Greenfoot site; downloading the code or running locally does not cause the red tint.
davmac davmac

2013/5/30

#
jagrosh, I'm guessing you're running Greenfoot with a different version of Java than your applet plugin is? Generally the applet plugin should be the most recent version of Java that you installed, whereas Greenfoot won't run with a new version unless you tell it to (use the "select VM" utility).
You need to login to post a reply.