code: public static ImageWriter getWriter(Image img, String formatName) {
  		final ImageTypeSpecifier type = ImageTypeSpecifier.createFromRenderedImage(toRenderedImage(img));
  		final Iterator<ImageWriter> iter = ImageIO.getImageWriters(type, formatName);
  		return iter.hasNext() ? iter.next() : null;
  	}
docs: 根据给定的Image对象和格式获取对应的{@link ImageWriter}，如果未找到合适的Writer，返回null
  
  @param img {@link Image}
  @param formatName 图片格式，例如"jpg"、"png"
  @return {@link ImageWriter}
  @since 4.3.2