/**
* 根据提供的文字生成jpg图片
*
* @param s
* String 文字
* @param align
* 文字位置(left,right,center)
* @param y
* y坐标
* @param width
* 图片宽度
* @param height
* 图片高度
* @param bgcolor
* Color 背景色
* @param fontcolor
* Color 字色
* @param font
* Font 字体字形字号
* @param jpgname
* String jpg图片名
* @return
*/
private static boolean createJpgByFontAndAlign(String s, String align, int y, int width, int height,
Color bgcolor, Color fontcolor, Font font, String jpgname) {
try { // 宽度 高度
BufferedImage bimage = new BufferedImage(width,
height, BufferedImage.TYPE_INT_RGB);
Graphics2D g = bimage.createGraphics();
g.setColor(bgcolor); // 背景色
g.fillRect(0, 0, width, hei