static S uploadToImageServer_new_jpg(BufferedImage img, S name) { ret uploadToImageServer_new_jpg(toJPEG(img), name); } static S uploadToImageServer_new_jpg(byte[] imgData, S name) { S page = postPage(imageServerURL() + "upload", "data", bytesToHex(imgData), "name", name); print(page); Matcher m = Pattern.compile("/images/([0-9]+)").matcher(page); if (!m.find()) fail("Image server said: " + page); ret imageServerURL() + m.group(1); }