I have a program that renders slightly differently in the Java application from Scratch itself. In the Java application when I stamp one of my sprites it leaves behind a gray outline. Did I do something wrong with my images or is there a difference in the way that they are rendered.
The program is here:
http://scratch.mit.edu/projects/Canthiar/4459
Edit: I was a bit overzealous and removed the project listed in this post from the site.
Last edited by Canthiar (2007-05-21 00:46:12)
Offline
A little digging leads me to believe that it is because the Java app is using bi-linear filtering while the download version uses nearest neighbor. The transparent parts of images are represented as a solid black and this black is getting blended with the light color in the image next to the transparent section.
I'm no Java expert, but it looks like it is getting set to blend using a bi-linear filter in Sprite.rotateAndScale( ) when it is allocating a AffineTransformOp object to create a new instance of Sprite.rotatedCostume. It really depends on how Sprite.rotationstyle gets set.
If it's not going to be changed for the Java app then I'm sure I can work around it so that it renders the same for both version of Scratch.
Offline
Hi, Canthiar.
Thanks for digging into this (including the Java code!) Your analysis is exactly right--the Java code is using bi-linear interpolation and Scratch uses nearest-neighbor. I will try changing the Java player and, if it's not too ugly and doesn't break, I'll put out a new version soon.
-- John
Offline
<key[ ]pressed?>
Offline