Convert JPEG file in to BitMap format OR BMP file
Dear All,
I have a problem of converting a JPEG file in to BMP file or bitmap file. I have loaded JPEG file in to array of bytes. Know i want to convert a loaded byte in to BitMap by decompressing JPEG array of byte.
Any help will be appreciated.
Thanks In Advance
Vinod Patel
# 3
why necessarily BMP? What's the purpose? The reason why I ask is because I suspect there may be other ways to achieve whatever it is that you want to accomplish. If it is simply because you want to convert JPG to BMP, then the Java3D Forum is maybe the wrong place.
# 4
The ImageIO class can read/write those formats. An example using files:
File in = new File("Your.jpg");
File out = new File("New.bmp");
BufferedImage bufi;
try
{
bufi = ImageIO.read(in);
ImageIO.write(bufi, "bmp", out);
}
catch (IOException ex)
{
ex.printStackTrace();
}