l'image Rotation coupée sur les côtés images mises en mémoire tampon, icône d'image, java
BufferedImage img = ImageIO.read(new File(paramString));
double locationX = img.getWidth(this)/2;
double locationY = img.getHeight(this)/2;
AffineTransform tx = AffineTransform.getRotateInstance(Math.toRadians(paramInt3), locationX, locationY);
AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_BILINEAR);
BufferedImage bimg = new BufferedImage (img.getWidth(this), img.getWidth(this), BufferedImage.TYPE_BYTE_INDEXED);
bimg = op.filter (img, null);
ImageIcon localImageIcon = new ImageIcon (bimg);
Pourquoi pourrait-côté être coupé? J'utilise une bibliothèque qui nécessite un résultat final ImageIcon.
où est la question? – jhamon
Mon code fait pivoter l'image mais les coins sont coupés en haut et à gauche – ogprogrammingsquad