Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

converting jpeg image to tiff

807591Apr 30 2008 — edited May 7 2008
Hi all
i am trying to convert jpe image to tiff format..i have tried with this code

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

public class Convert
{
public static void main(String[] args)
{
File in = new File("a.jpg");
File out = new File("a.tif");
BufferedImage bufi;
try
{
bufi = ImageIO.read(in);
ImageIO.write(bufi, "tif", out);
}
catch (IOException ex)
{
ex.printStackTrace();
}
}
}

it converts but when i open tat tiff image it shows nothing
pls helpme
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2008
Added on Apr 30 2008
21 comments
4,142 views