Results 1 to 2 of 2
- 02-06-2009, 12:17 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 4
- Rep Power
- 0
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?
- 02-10-2009, 06:08 AM #2
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
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
-
How can i save the data Internally(auto save)
By Rama Koti Reddy in forum AWT / SwingReplies: 2Last Post: 11-01-2010, 08:31 PM -
Hough transform...........
By Mazharul in forum Java 2DReplies: 1Last Post: 01-21-2009, 11:43 PM -
Transform Scale
By Java Tip in forum java.awtReplies: 0Last Post: 06-21-2008, 08:53 PM -
Transform Shear
By Java Tip in forum java.awtReplies: 0Last Post: 06-21-2008, 08:52 PM -
Transform Demo
By Java Tip in forum java.awtReplies: 0Last Post: 06-21-2008, 08:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks