Changeset 6980 for extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/util/ImagesUtil.java
- Timestamp:
- Sep 20, 2010, 8:51:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/transverse/util/ImagesUtil.java
r6958 r6980 65 65 66 66 /** 67 * Fonction de rotation d'uneimage68 * @param image l'image à tourner69 * @param angle l'angle derotation70 * @return l'image pivotée67 * rotates an image 68 * @param image the image to rotate 69 * @param angle the angle of rotation 70 * @return the rotated image 71 71 */ 72 72 public static BufferedImage rotate(BufferedImage image, double angle) { … … 94 94 95 95 /** 96 * Ecriture d'une image dans un fichier png97 * @param file le fichier98 * @param bufferedImage l'image96 * Writes an image in a file 97 * @param file the file 98 * @param bufferedImage the image 99 99 * @throws IOException 100 100 */ … … 104 104 105 105 /** 106 * Mise à l'échelle d'uneimage107 * @param filePath le chemin vers le fichier de l'image108 * @param tempName le nom du fichier résultat109 * @param width la largeur110 * @param height la hauteur111 * @return true si l'image a effectivement ete redimensionnee106 * scales an image 107 * @param filePath the path to the file of the image 108 * @param tempName the name of the resulting file 109 * @param width the width 110 * @param height the height 111 * @return true if successful 112 112 * @throws Exception 113 113 */ … … 120 120 int imageWidth = image.getWidth(null); 121 121 int imageHeight = image.getHeight(null); 122 //on n'agrandit pas l'image123 122 if (imageWidth < width || imageHeight < height) { 124 123 return false; … … 141 140 } 142 141 142 /** 143 * Save an image 144 * @param fileName the name of the file 145 * @param img the img 146 * @throws FileNotFoundException 147 * @throws IOException 148 */ 143 149 private static void saveImage(String fileName, BufferedImage img) throws FileNotFoundException, IOException { 144 150 Iterator iter = ImageIO.getImageWritersByFormatName("jpeg"); … … 205 211 } 206 212 207 // This method returns true if the specified image has transparent pixels 213 /** 214 * This method returns true if the specified image has transparent pixels 215 * @param image the image to check 216 * @return true or false 217 */ 208 218 public static boolean hasAlpha(Image image) { 209 219 // If buffered image, the color model is readily available
Note: See TracChangeset
for help on using the changeset viewer.