I think what you are looking for is "Composite". Look at the javadoc of the image service and service factory, there's a way to create composite and there's a function to take a list of composites to compose a single image.
On Nov 1, 4:33 am, Secret <[email protected]> wrote: > I have try the API. Seems the ImageService do not support join image. > > I have piece of code to join as below, it needs to convert to GAE > version . Any idea? > > BufferedImage img1 = ImageIO.read(new > ByteArrayInputStream(byte1)); > BufferedImage img2 = ImageIO.read(new > ByteArrayInputStream(byte2)); > > int w = img1.getWidth() + img2.getWidth(); > int h = img1.getHeight(); > if (img1.getHeight() < img2.getHeight()) > h = img2.getHeight(); > > System.out.println("w:" + w + " h:" + h); > BufferedImage combined = new BufferedImage(w, h, > BufferedImage.TYPE_INT_RGB); > > Graphics g = combined.getGraphics(); > g.drawImage(img1, 0, 0, null); > g.drawImage(img2, img1.getWidth(), 0, null); > g.dispose(); > > ByteArrayOutputStream bytes = new > ByteArrayOutputStream(); > MemoryCacheImageOutputStream toFs = new > MemoryCacheImageOutputStream( > new BufferedOutputStream(bytes)); > ImageWriter writer = > ImageIO.getImageWritersBySuffix(ext).next(); > writer.setOutput(toFs); > IIOImage image = new IIOImage(combined, null, null); > ImageWriteParam params = > writer.getDefaultWriteParam(); > writer.write(null, image, params); > return bytes.toByteArray(); -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
