Foros del Web » Programación para mayores de 30 ;) » Java »

como hacer un efecto Blur en Java?

Estas en el tema de como hacer un efecto Blur en Java? en el foro de Java en Foros del Web. Que onda!..Soy nuevo en el Foro, y tengo una duda: tengo que realizar un proyecto en Java, se trata de manipular imagenes (Image Handler), y ...
  #1 (permalink)  
Antiguo 22/08/2005, 10:56
 
Fecha de Ingreso: agosto-2005
Ubicación: Guate!!
Mensajes: 8
Antigüedad: 18 años, 8 meses
Puntos: 0
como hacer un efecto Blur en Java?

Que onda!..Soy nuevo en el Foro, y tengo una duda:
tengo que realizar un proyecto en Java, se trata de manipular imagenes (Image Handler), y hay una parte del programa que se trata de hacerle un efecto blur a la imagen, y me preguntaba, como lo puedo hacer?/....

lo que habia pensado era mover un poco de su posicion original, cada pixel, para que se mire algo borroso, pero no creo que se mire bien, he oido que hay algoritmos para eso, no se si alguno de ustedes sabe alguno, o me podria explicar como crear el mio, GRACIAS!!!


ahh, se me olvidaba, el formato de la imagen es .bmp!
  #2 (permalink)  
Antiguo 22/08/2005, 11:25
 
Fecha de Ingreso: noviembre-2003
Ubicación: Mexico
Mensajes: 1.081
Antigüedad: 20 años, 5 meses
Puntos: 7
asi es, existen algoritmos, te voy a citar la idea textualmente en ingles del tutorial que tengo:

"A more practical way to do it is to render the current screen to a texture, then go into ortho mode and blend that texture over the entire screen. This could be done every frame or intermittently.

To create the blur effect, we actually render the texture when rendering to the texture. This is a bit confusing. Basically, when we go to render the screen to the texture, we go into ortho mode and blend the current texture of the screen over the object that is being blurred. This acts as a recursive blending. This makes it so we don't do tons of passes to create the blur trail.

The fading happens when we blend the current rendered texture with the blackness of the background. When blending, we need to blend the texture with a small decrease in alpha. Basically, we don't render the texture over the screen at full alpha, otherwise it would never blend away, or at least it would take forever to fade."

Espero te sirva.
Tengo el codigo de como se hace (con .bmp), pero no se si te sea util, ya que es utilizando C/C++ con OpenGL....

saludos
  #3 (permalink)  
Antiguo 23/08/2005, 06:53
 
Fecha de Ingreso: octubre-2003
Mensajes: 3.578
Antigüedad: 20 años, 6 meses
Puntos: 51
Lo mas directo quizá sea usar el Java API 2D.

Como por ejemplo, así:

http://java.sun.com/j2se/1.3/docs/gu...image.fm8.html
explicado tambien aqui:
http://www.javaworld.com/javaworld/j...-media-p2.html

Para leer las imagenes en BMP, puedes usar el API ImageIO, presente a partir de la 1.4

Saludos

Saludos
  #4 (permalink)  
Antiguo 24/08/2005, 16:33
 
Fecha de Ingreso: agosto-2005
Ubicación: Guate!!
Mensajes: 8
Antigüedad: 18 años, 8 meses
Puntos: 0
Cita:
Iniciado por GreenEyed
Lo mas directo quizá sea usar el Java API 2D.

Como por ejemplo, así:

http://java.sun.com/j2se/1.3/docs/gu...image.fm8.html
explicado tambien aqui:
http://www.javaworld.com/javaworld/j...-media-p2.html

Para leer las imagenes en BMP, puedes usar el API ImageIO, presente a partir de la 1.4

Saludos

Saludos
Gracias, los voy a leer, y te cuento que pasa!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:59.