Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    4
    Rep Power
    0

    Post how to transform images and save them?

    I'm new to Java Advanced Imaging. I want to apply some geometric transformations to 2 separate images (JPEG) and then concatenate these 2 images. I encounter these problems.
    (1) I applied these transformations and obtained RenderedOp images. I do not know how to write these as JPEG image files.

    (2) when applying rotation to images, it produces a black background. Can i change this background?

    Can anyone help plz?

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    Use ImageIO to write them as jpeg, but you'll have to convert the RenderedOp images to BufferedImages first.

    Use the copyData method to get a WritableRaster from your RenderedOp. You can then construct a java.awt.image.BufferedImage directly from that, and then call javax.imageio.ImageIO.write(....) with your BufferedImage to write it out as a jpeg file.

    Don't know about the background....

Similar Threads

  1. How can i save the data Internally(auto save)
    By Rama Koti Reddy in forum AWT / Swing
    Replies: 2
    Last Post: 11-01-2010, 09:31 PM
  2. Hough transform...........
    By Mazharul in forum Java 2D
    Replies: 1
    Last Post: 01-22-2009, 12:43 AM
  3. Transform Scale
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-21-2008, 09:53 PM
  4. Transform Shear
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-21-2008, 09:52 PM
  5. Transform Demo
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-21-2008, 09:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •