Re: [JAVA3D] SV: [JAVA3D] SV: [JAVA3D] TextureLoading with JAI

2002-01-15 Thread Dipl. Ing. Paul Szawlowski
How does your image look like after loading ? Are you having the right colors then ? Fredrik Lydén schrieb: > I am not using any ImageComponent (how?): This is done by the TextureLoader, which does a few things under the hood like rescaling the image to fit the texture requirements, allocating

[JAVA3D] SV: [JAVA3D] SV: [JAVA3D] TextureLoading with JAI

2002-01-14 Thread Fredrik Lydén
I am not using any ImageComponent (how?): Example: -- PlanarImage pI = JAI.create("fileload", fileName); BufferedImage bI = new BufferedImage(pI.getWidth(), pI.getHeight(), BufferedImage.TYPE_INT_ARGB); Graphics2D

Re: [JAVA3D] SV: [JAVA3D] TextureLoading with JAI

2002-01-14 Thread Dipl. Ing. Paul Szawlowski
Regards, > Fredrik > > -Ursprungligt meddelande- > Fren: Discussion list for Java 3D API > [mailto:[EMAIL PROTECTED]]Fvr Dipasqua, Aldo > Skickat: den 14 januari 2002 14:29 > Till: [EMAIL PROTECTED] > Dmne: Re: [JAVA3D] TextureLoading with JAI > > You might want to

[JAVA3D] SV: [JAVA3D] TextureLoading with JAI

2002-01-14 Thread Fredrik Lydén
: [EMAIL PROTECTED] Ämne: Re: [JAVA3D] TextureLoading with JAI You might want to use an image converter as shown below. Aldo /** * Convert any buffered image to another type of buffered image * @param oldImage the image to be converted * @param type the image type (e.g

Re: [JAVA3D] TextureLoading with JAI

2002-01-14 Thread Dipasqua, Aldo
: [EMAIL PROTECTED] Subject: Re: [JAVA3D] TextureLoading with JAI I'm ot quite sure about that but there are BufferedImage formats like BGR and RGB. So I suppose that the order of the color bands is reversed. Check the BufferedImage typae after reading. To Correct this you will have to go deeper

Re: [JAVA3D] TextureLoading with JAI

2002-01-14 Thread Dipl. Ing. Paul Szawlowski
I'm ot quite sure about that but there are BufferedImage formats like BGR and RGB. So I suppose that the order of the color bands is reversed. Check the BufferedImage typae after reading. To Correct this you will have to go deeper into the java.awt.image package. Probably it can be solved by creat

[JAVA3D] TextureLoading with JAI

2002-01-14 Thread Fredrik Lydén
Hi! I have some problems loading textures with JAI; PlanarImage planarImage = JAI.create("fileload", fileName); Texture texture = new TextureLoader(planarImage.getAsBufferedImage()); results in incorrect colors (i.e. yellow gets turquoise). Without using JAI the colors are correct, but the loa