I was able to make the above code work with changes. But yours seems a good approach as well. Thank you for the help :)
On Jul 6, 3:21 pm, hriess <[email protected]> wrote: > Here is a part from a servlet I use to scale pictures: > > protected void doPost(HttpServletRequest request, > HttpServletResponse response) throws > ServletException, IOException > { > ... > String angleStr = request.getParameter("angle"); > ... > // scale the image > ParameterBlock parameterBlock = new ParameterBlock(); > parameterBlock.addSource(convertedImage); > parameterBlock.add(scale); > parameterBlock.add(scale); > parameterBlock.add(0.0f); > parameterBlock.add(0.0f); > parameterBlock.add(new InterpolationNearest()); > PlanarImage scaledImage = JAI.create("scale", parameterBlock); > > // create a jpeg stream > ByteArrayOutputStream byteArrayOutputStream = new > ByteArrayOutputStream(); > JAI.create("encode", scaledImage, byteArrayOutputStream, "jpeg"); > ServletOutputStream servletOutputStream = response > .getOutputStream(); > servletOutputStream.write(byteArrayOutputStream.toByteArray()); > > On the client side use the GWT image method 'setUrl' to pass the > parameters to te servlet (angle in the example). > Maybe I've misunderstood, but this istn't really a GWT problem. > > I hope this helps > Holger -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-web-toolkit?hl=en.
