No i dont think i use active rendering. I just have the standard paint(Graphics g) function. But im following a tutorial that uses it in an aplication.
I started converting anyway and noticed that aplication cant display all transparent images correctly. In applets i use
1
| img=getImage(getCodeBase(),"img.png"); |
transparent images are displayed correctly whether i did them in IfranView or my graphics person did them with his high-teck graphics software. But when i try drawing images in an application, the IfranView PNGs are displayed with background even though they have transparency; my graphics person's images are displayed properly.
Here is my image loader function:
1 2 3 4 5 6 7 8 9 10 11 12 13
| public Image getImage(String filename){ URL url = this.getClass().getClassLoader().getResource(filename); BufferedImage source=null; try{ source = ImageIO.read(url); } catch(IOException e){} GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment(). getDefaultScreenDevice().getDefaultConfiguration(); Image image = gc.createCompatibleImage(source.getWidth(),source.getHeight(), Transparency.TRANSLUCENT); image.getGraphics().drawImage(source,0,0,null,this); return image; } |