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

[308 byte] By [vinodpatel2006a] at [2007-11-27 0:49:01]
# 1
why?
mokopaa at 2007-7-11 23:18:18 > top of Java-index,Security,Cryptography...
# 2
Because i have a runnig project in C++. C++ have standarad library to decode a JPEG file in to BMP. But i don't want to convert C++ code in to JAVA. Instead i want to utilize JAVA readymade libraries.Thanks.Vinod Patel
vinodpatel2006a at 2007-7-11 23:18:18 > top of Java-index,Security,Cryptography...
# 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.
mokopaa at 2007-7-11 23:18:18 > top of Java-index,Security,Cryptography...
# 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();

}

ChuckBinga at 2007-7-11 23:18:18 > top of Java-index,Security,Cryptography...
# 5
Dear mokopa, can you suggest me place in forum where i put this question.ThanksVinod
vinodpatel2006a at 2007-7-11 23:18:18 > top of Java-index,Security,Cryptography...
# 6
Java Media Framework (JMF)
mokopaa at 2007-7-11 23:18:18 > top of Java-index,Security,Cryptography...