Ola pessoal essa funcao que fiz ela espelha e eu gostaria de uma que rotacione a imagem 90 graus alguem pode me ajudar?
essa é a funcao que fiz
private void jMenuItemRotacaoEspelhamentoActionPerformed(java.awt.event.ActionEvent evt){
int width = imagem1.getWidth();
int heigth = imagem1.getHeight();
int pixel;
for (int i =0; i< width/2; i++){
for (int j=0; j <heigth; j++){
pixel = imagem1.getRGB( i, j);
imagem1.setRGB (width -i -1, j, pixel);
}
}
this.imageUpdate(imagem1, ALLBITS, 0, 0, width, heigth);
}
mais ela não rotaciona a imagem apenas espelha
ALGORITMOS E IMPLEMENTAÇÕES ⇒ funcao que rotacione a imagem no Java
Moderador: [ Moderadores TTB ]
-
- Tópicos Semelhantes
- Respostas
- Exibições
- Última msg
-
- 1 Respostas
- 1695 Exibições
-
Última msg por cpusam
-
-
Nova mensagem Programação Orientada a Objetos em Java
por Deleted User 26963 » » em ALGORITMOS E IMPLEMENTAÇÕES - 0 Respostas
- 1262 Exibições
-
Última msg por Deleted User 26963
-
-
- 1 Respostas
- 9865 Exibições
-
Última msg por AnthonyC
-
- 2 Respostas
- 12144 Exibições
-
Última msg por inguz
-
- 1 Respostas
- 263 Exibições
-
Última msg por petras