public static Image convertStreamToPNG(InputStream is) throws IOException {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		byte[] buf = new byte[defaultBufferSize];
		int n;
		while ((n = is.read(buf)) >= 0) {
			baos.write(buf, 0, n);
		}
		baos.close();
		return convertBlobToPNG(baos.toByteArray());
	}