Painting the background

Hi everyone. I have a little question.

I'm trying to make my application draw some background images (in the HBackground) And everything seems to be ok except when the image is drawed. It appears but distorted. I first put the background and then reduce the video playing so te background could be seen. Maybe I have to reduce the video first? For reducing it I use the AWTVideoSizeControls and ServiceContext way

This is the little piece of code for painting the background

publicvoid cambiar_fondo_imagen(String imagen){

HBackgroundConfigTemplate plantilla =new HBackgroundConfigTemplate();

plantilla.setPreference(HBackgroundConfigTemplate.FLICKER_FILTERING, HBackgroundConfigTemplate.REQUIRED);

plantilla.setPreference(HBackgroundConfigTemplate.STILL_IMAGE, HBackgroundConfigTemplate.REQUIRED);

HBackgroundConfiguration config = planoBackground.getBestConfiguration(plantilla);

HStillImageBackgroundConfiguration configStill =null;

if (configinstanceof HStillImageBackgroundConfiguration){

configStill = (HStillImageBackgroundConfiguration)config;

}

planoBackground.reserveDevice(this);

try{planoBackground.setBackgroundConfiguration(configStill);}

catch (Exception e){System.out.println("Excepcion: " + e);}

if (config !=null){

HBackgroundImage imagenFondo =new HBackgroundImage(imagen);

try{configStill.displayImage(imagenFondo);}

catch (Exception e){System.out.println("Excepcion: " + e);}

}

}

Maybe I may change some HBackgroundConfigTemplate options? (I'm using an i-frame of a mpg as the background image)

[2540 byte] By [Zuarkoa] at [2007-11-26 19:16:58]
# 1
Hi Zuarko,What do you mean when you say that the image" appears but distorted"?Could it be that you are trying to display an NTSC MPEG still on a PAL system or vise versa?Roger
_Roger_a at 2007-7-9 21:30:41 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Oh God, I forgot that "little detail" I'll see if I tried an NTSC MPEG, not sure right now. Thanks :)

"appears but distorted" means that the imagen appears the following way: half of image is correct but the other half is not the image is the video layer before reducing it to a quarter of the screen.

Zuarkoa at 2007-7-9 21:30:41 > top of Java-index,Java Mobility Forums,Consumer and Commerce...