src/main/java/com/visiansystems/psdcmd/PsdCmd.java
public static void exportLayer(Layer layer, String prefix) {
		BufferedImage bi = layer.getImage();
		if (bi == null)
			return;

		// Export image
		try {
			// Create an unique file name
			UUID name = UUID.randomUUID();
			// Add an letter into the file name for CSS
			String fileName = "a" + name.toString();
			// Open file
			File outputFile = new File(prefix + "/img/" + fileName + ".png");
			// Save image
			ImageIO.write(bi, "png", outputFile);
			// Export object to HTML
			exportObject(layer, fileName);
		} catch (IOException e) {
			System.out.println(e.getMessage());
		}
	}
/**
	 * exportLayer
	 * Export the image, CSS and HTML layer image
	 * @param layer The layer object to export.
	 * @param prefix The directory to export the image.
	 */
exportLayer
Export the image, CSS and HTML layer image
@param layer The layer object to export.
@param prefix The directory to export the image.
exportLayer Export the image CSS and HTML layer image @param layer The layer object to export . @param prefix The directory to export the image .
public static void exportLayer(Layer layer, String prefix) {
		BufferedImage bi = layer.getImage();
		if (bi == null)
			return;
		try {
			UUID name = UUID.randomUUID();
			String fileName = "a" + name.toString();
			File outputFile = new File(prefix + "/img/" + fileName + ".png");
			ImageIO.write(bi, "png", outputFile);
			exportObject(layer, fileName);
		} catch (IOException e) {
			System.out.println(e.getMessage());
		}
	}
public static void exportLayer ( Layer layer , String prefix ) { BufferedImage bi = layer . getImage ( ) ; if ( bi == null ) return ; try { UUID name = UUID . randomUUID ( ) ; String fileName = "a" + name . toString ( ) ; File outputFile = new File ( prefix + "/img/" + fileName + ".png" ) ; ImageIO . write ( bi , "png" , outputFile ) ; exportObject ( layer , fileName ) ; } catch ( IOException e ) { System . out . println ( e . getMessage ( ) ) ; } }
exportLayer
 Export the image, CSS and HTML layer image
 @param layer The layer object to export.
exportLayer Export the image CSS and HTML layer image @param layer The layer object to export .
// Export image // Create an unique file name // Add an letter into the file name for CSS // Open file // Save image // Export object to HTML